Add tag title to archive

Community Forums Forums General Discussion Add tag title to archive

This topic is: not resolved

Tagged: , ,

This topic contains 1 reply, has 2 voices, and was last updated by  ramseyp 2 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #69763


    Hello all does anyone know how using genesis hooks you would add the tag title of an archive. So when someone clicks tag fruit it would you show Tags in the normal title H1 postion and then list all the posts with fruit underneath. It seems to miss the title off.

    Any help would be great



    I think this, added to your functions.php file should work:

    add_action ( 'genesis_before_content','my_tag_title' );
    function my_tag_title() {
      if ( is_tag() ) {
        $term = get_tag(get_query_var('post_tag'),false);
        $name = $term->name;
        echo '<h1 class="entry-title">'. $name .'</h1>';

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.