WordPress.org

Forums

WP-PageNavi
[resolved] WP-pagenav in listing description taxonomies. (3 posts)

  1. alejodec
    Member
    Posted 8 months ago #

    Hello there! Sorry for my English, I use google translator.
    Using WP-PageNavi in post and pages and it works great.
    I have this code in a template showing the description of a taxonomy but as I can not paginate results pages.
    Can someone help me? I'd be very grateful.

    <ul>
    			<?php
    			$args = array(
    				'taxonomy' => 'actor',
    				'order'=>'ASC'
    			);
    			$active_slug = get_query_var('actor');
    			$collections = get_categories($args);
    			foreach ($collections as $c)
    			{
    			($c->slug == $active_slug)
    				?>
    				<li><?php print $c->description; ?></li>
    
    					<?php
    			}
    			?>
    			</ul>

    https://wordpress.org/plugins/wp-pagenavi/

  2. Lester Chan
    Member
    Plugin Author

    Posted 8 months ago #

    It will not paginate get_categories(). It only paginate posts that is queried using WP_Query

  3. alejodec
    Member
    Posted 8 months ago #

    Ok, many thanks for the answer.

Reply

You must log in to post.

About this Plugin

About this Topic