Taxonomy Images
Pagination Taxonomy Images Loop (2 posts)

  1. riddler20
    Posted 5 years ago #

    I am using the piece of code that displays all taxonomy images on a category.

    $cats = get_categories();
    foreach ( $cats as $c ) {
        $url = get_category_link( $c->term_id );
        $img = $taxonomy_images_plugin->get_image_html( 'detail', $c->term_taxonomy_id );
        if( !empty( $img ) )
            print '<a href="' . $url . '">' . $img . '</a>';

    I currently have 100+ categories and more will be added, so I am wanting to possible do pagination so the page doesn't become massive in size and a drain on the database.

    Would anyone give me an example on how I would do this? I am not a complete noob at PHP but not the best either.

  2. Michael Fields
    Plugin Contributor

    Posted 5 years ago #

    Hi Riddler,

    Please see the code in my taxonomy list shortcode plugin. It supports paging of taxonomy terms.

    Best wishes,

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Taxonomy Images
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic