Multipage get_categories function
-
Hi, I used the following codes to list all the categories that I have on my site, but the issue is that I have too many categories (100+). So, I would like to paginate the category listing. (i.e 10 categories each page… etc) I don’t know how I would approach this using the get_categories function within WordPress. Help??? Thanks!
<?php $args=array( 'orderby' => 'name', 'order' => 'ASC' ); $categories=get_categories($args); foreach($categories as $category) { echo '<p>Category: <a>term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </p> '; echo '<p> Description:'. $category->description . '</p>'; echo '<p> Post Count: '. $category->count . '</p>'; } ?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Multipage get_categories function’ is closed to new replies.