WordPress.org

Forums

Number of posts attached to each tag (3 posts)

  1. boutros
    Member
    Posted 4 years ago #

    What is the code to get the number of posts attached to each tag as shown in WordPress Admin Panel (Posts -> Posts tags).

    Thanks.

  2. Michael
    Forum Moderator
    Posted 4 years ago #

    <?php $taggs = get_tags();
    foreach ($taggs as $tagg) { echo $tagg->name.'-'.$tagg->count; } ?>

    http://codex.wordpress.org/Function_Reference/get_tags

    individual:
    http://codex.wordpress.org/Function_Reference/get_tag

  3. boutros
    Member
    Posted 4 years ago #

    Thanks alchymyth.

Topic Closed

This topic has been closed to new replies.

About this Topic