• Resolved totu

    (@totu)


    Hi,

    How to display count in custom taxonomy page? If i go in taxonomy page, then it shows me how many post are in this taxonomy category.

    Example: If are custom taxonomy ‘music’ and category are ‘rock’, then it shows how many posts are in category ‘rock’, if category is ‘disco’ it shows how many posts are in category ‘disco’, etc

Viewing 1 replies (of 1 total)
  • Thread Starter totu

    (@totu)

    I found solution by myself. I modified that ts31os script

    <?php
    $taxonomy = ‘developer’;
    $getTaxName = get_query_var($taxonomy);
    $postsInCat = get_term_by(‘name’, $getTaxName, $taxonomy);
    $postsInCat = $postsInCat->count;
    echo $postsInCat;
    ?>

Viewing 1 replies (of 1 total)
  • The topic ‘display count in custom taxonomy page’ is closed to new replies.