Glossary Term
paginate_links()
paginate_links() — Retrieves paginated links for archive post pages. Technically, the function can be used to create paginated link list for any area. The ‘base’ argument is used to reference the url, which will be used to create the paginated links. The ‘format’ argument is then used for replacing the page number. It is however, most likely and by default, to be used on the archive post pages. The ‘type’ argument controls format of the returned value. The default is ‘plain’, which is just a string with the links separated by a newline character. The other possible values are either ‘array’ or ‘list’.
Inputs: $args (string|array): Optional. Array or string of arguments for generating paginated links for archives. Field $base (string): Base of the paginated url. Default empty. Field $format (string): Format for the pagination structure. Default empty. Field $total (int): The total amount of pages. Default is the value WP_Query’s max_num_pages or 1. Field $current (int): The current page number. Default is ‘paged’ query var or 1. Field $aria_current (string): The value for the aria-current attribute. Possible values are ‘page’, ‘step’, ‘location’, ‘date’, ‘time’, ‘true’, ‘false’. Default is ‘page’. Field $show_all (bool): Whether to show all pages. Default false. Field $end_size (int): How many numbers on either the start and the end list edges.
Returns string|string[]|null: String of page links or array of page links, depending on ‘type’ argument. Null if total number of pages is less than 2.
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
