WordPress.org

Ready to get started?Download WordPress

Forums

Category Thumbnail
[resolved] Template tag instead of ShortCode? (2 posts)

  1. tzeldin88
    Member
    Posted 3 years ago #

    Can this plugin be implemented by a Template Tag (php), rather than a ShortCode?
    I want to integrate it into a listing of category terms, from wp_list_caetgories, or another similar function.

    http://wordpress.org/extend/plugins/dirtysuds-category-thumbnail/

  2. Pat Hawks
    Member
    Plugin Author

    Posted 3 years ago #

    Here's how you can make this work in PHP

    dirtysuds_category_thumb( array( 'id' => 7 ) );

    Where 7 is the numerical id of the category you'd like an image of.
    If you'd like the image to link to the archive page for that category, you can add the link = true attribute, like:

    dirtysuds_category_thumb( array( 'id' => 7 , 'link' => 'true' ) );

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic