WordPress.org

Ready to get started?Download WordPress

Forums

Taxonomy Images
Pagination Taxonomy Images Loop (2 posts)

  1. riddler20
    Member
    Posted 3 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
    Themer
    Plugin Author

    Posted 3 years ago #

    Hi Riddler,

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

    Best wishes,
    -Mike

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic