• Resolved >>Sara<<

    (@tommasopiccarreda)


    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/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Custom Categories question’ is closed to new replies.