WOOF :: pagination( Arguments $args = array() )

Returns:

  • String The HTML for the pagination control

Outputs HTML pagination code for an archive listing page.

Important Note: This method requires an active global query with the posts_per_page argument set to a value that is not -1. You cannot use this method with the WOOF::posts method, since that method is more akin to the WordPress get_posts method for retrieving posts without affecting the global query.

It must be used in conjunction with either The WordPress Loop, the WordPress query_posts method, the query_posts, or other methods on other WOOF / MEOW objects involving queries, which are generally prefixed with “query_”. (see related methods)

Example:

Parameters:

  • Arguments $args = array()

    An arguments string or array supporting the following parameters:

    • “pages” => the maximum number of pages to display. If not specified, will default to $wp_query->max_num_pages – default ”
    • “range” => the max number of pages to display in a slice of the available range (displayed between the prev / next buttons) – default 5
    • “class_page” => the CSS class for each numbered page item link in the list – default “page”
    • “class_current” => the CSS class for the CURRENT numbered page link in the list – default “current”
    • “class_inactive” => the CSS class for inactive numbered pages in the list – default “inactive”
    • “class_wrap” => the CSS class for the entire pagination control “pagination”
    • “tag_wrap” => the tag to use to wrap the entire pagination list – default “nav” (an HTML5 tag)
    • “tag_wrap_pages” => the tag used to wrap the numbered page items – default “div”
    • “class_pages” => the class of the element wrapping the numbered page items – default “pages”
    • “show_page_count” => whether to display a page count statement with the control (page x of y) – default true
    • “tag_page_count” => the tag wrapping the page count – default “span”
    • “class_page_count” => the CSS class of the page count element – default “page-count”
    • “t_page_count” => an sprintf template for the page count – default “Page %d of %d”
    • “show_first” => whether to show the link to jump to the first page. This can be boolean true to only display it if you’re not currently on the first page, or “always” to display it every time – default true
    • “class_first” => the CSS class of the (go to) first link – default “first”
    • “title_first” => the title attribute for the (go to) first link – default “First Page”
    • “t_first” => the template for the HTML inside the (go to) first link – default – __(“« First” WOOF_DOMAIN)
    • “show_previous” => whether to show the link to jump to the previous page. This can be boolean true to only display it if you’re not currently on the previous page, or “always” to display it every time – default true
    • “class_previous” => the CSS class of the (go to) previous link – default “previous”
    • “title_previous” => the title attribute for the (go to) previous link – default “Previous Page”
    • “t_previous” => the template for the HTML inside the (go to) previous link – default – __(“« Previous” WOOF_DOMAIN)
    • “show_next” => whether to show the link to jump to the next page. This can be boolean true to only display it if you’re not currently on the next page, or “always” to display it every time – default true
    • “class_next” => the CSS class of the (go to) next link – default “next”
    • “title_next” => the title attribute for the (go to) next link – default “Next Page”
    • “t_next” => the template for the HTML inside the (go to) next link – default – __(“Next ›” WOOF_DOMAIN)
    • “show_last” => whether to show the link to jump to the last page. This can be boolean true to only display it if you’re not currently on the last page, or “always” to display it every time – default true
    • “class_last” => the CSS class of the (go to) last link – default “last”
    • “title_last” => the title attribute for the (go to) last link – default “Last Page”
    • “t_last” => the template for the HTML inside the (go to) last link – default – __(“Last ›” WOOF_DOMAIN)

Latest From the Blog

MasterPress 1.3.10 is now available

9th November 2023

MasterPress 1.3.10 is a feature and bugfix release. Workaround for fatal error introduced by changes to WordPress’ wpdb class in WordPress 6.4. Added actions to MPC files upload_field & WF image save_image functions.

Plugin Requirements

MasterPress requires a minimum of WordPress version 4.9, MySQL 5.6, and PHP version 5.6.20.

We also recommend that PHP is configured to use a memory limit of 64MB per request (128MB may be required for sites with higher complexity).

This plug-in is not compatible with the WordPress.com hosted service.

Three AM