• I found this useful.

    https://wordpress.stackexchange.com/questions/21234/how-to-enable-all-tag-descriptions-in-loop

    $tags = get_the_tags(); // for the specific post
    // $tags = get_tags(); // all tags
    $html = '<div class="post_tags">';
    foreach ( $tags as $tag )
    {
        $tag_link = get_tag_link( $tag->term_id );
    
        $html .= "Describtion for ".ucfirst( strtolower( $tag->name ) ).": $tag->description";
        $html .= "<a href='{$tag_link}' title='{$tag->name} Tag' class='{$tag->slug}'>{$tag->name}</a>";
        }
    
    $html .= '</div>';
    echo $html;

    This is more or less what I want.

    BUT…. how can I show this output on the Home Page only?

    I assume I need to create a new file?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Output All Tag Descriptions from the DB on Home Page’ is closed to new replies.