Title: Custom Categories question
Last modified: August 30, 2016

---

# Custom Categories question

 *  Resolved [>>Sara<<](https://wordpress.org/support/users/tommasopiccarreda/)
 * (@tommasopiccarreda)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/custom-categories-question/)
 * Hey there
    since that my theme use for portfolio pages a custom taxonomy about
   category and tag (to distinguish from default post pages) I need to tell to your
   amazing plugin to show these customs categories and tags instead of that default.
 * to show the categories I use this code:
 *     ```
       $terms = get_the_terms($post->id,"project-type");
       $project_cat = null;
       if(empty($terms)) $terms = array('1' => (object) array('name' => 'nothing', 'slug' => 'none'));
       foreach ( $terms as $term ) {
       echo '<p class="mine-cat">' . $term->name . '';
       }
       ```
   
 * and this code to show the tags:
 *     ```
       $project_attrs = get_the_terms( $post->ID, 'project-attributes' );
       if (!empty($project_attrs))
       {
       foreach($project_attrs as $attr)
       echo '<p class="mine-tag">' . $attr->name . '</p>';
       }
       ```
   
 * Can you provide please what changes I have to make in your plugin php to show
   these cat and tag beside the thumbnail of the popular list?
 * Thanks in advance!
 * [https://wordpress.org/plugins/wordpress-popular-posts/](https://wordpress.org/plugins/wordpress-popular-posts/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/custom-categories-question/#post-6716490)
 * Hi Sara!
 * Somehow I missed your topic 😛 Sorry for the long delay.
 * To do that, you’ll need to use one of [WPP’s filter hooks](https://github.com/cabrerahector/wordpress-popular-posts/wiki/3.-Filters)
   to further customize the HTML output and include your custom taxonomies in it.

Viewing 1 replies (of 1 total)

The topic ‘Custom Categories question’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-popular-posts/assets/icon-256x256.png?rev=1232659)
 * [WP Popular Posts](https://wordpress.org/plugins/wordpress-popular-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-popular-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-popular-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-popular-posts/reviews/)

## Tags

 * [add_filter](https://wordpress.org/support/topic-tag/add_filter/)
 * [category](https://wordpress.org/support/topic-tag/category/)
 * [tag](https://wordpress.org/support/topic-tag/tag/)
 * [wpp_custom_html](https://wordpress.org/support/topic-tag/wpp_custom_html/)
 * [wpp_post](https://wordpress.org/support/topic-tag/wpp_post/)

 * 1 reply
 * 2 participants
 * Last reply from: [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/custom-categories-question/#post-6716490)
 * Status: resolved