Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1002364

    HI
    I’d have my portfolio tags displayed on my portfolio items, and would like the title of the tags to be shown on the page that you click through to from a tag link. Is there a way to edit these page templates? I’d like the title to show up instead of “Portfolio Item” on those pages, and would like to be able to add widgets to the sidebars, or change the page layout.

    thanks for your help
    Nancy

    #1002591

    Hey Munford,

    Please add this code to your child theme functions.php:

    
    add_filter('avf_tag_label_names','new_tag_label', 10, 1);
    function new_tag_label($title){ 
        if(is_tag()){
            $currenttag = single_tag_title('',false);
            $title = "
    <h3 class='post-title tag-page-post-type-title'>".$currenttag. "</h3>
    ";
        }
        return $title;
    }
    

    Best regards,
    Dude

    #1002655

    Hey Dude
    Thanks that worked great! There seems to be an “empty” title container above the one with the tag title – can that go away?
    Is there any way to further edit that archive page template? I found where to set the sidebars, but would like to change some other setting.
    I’d also like to have the excerpts show on the portfolio grid instead of just the title, if possible.

    thanks for your help
    Nancy

    • This reply was modified 6 years, 3 months ago by Munford.
    #1002662

    Hey!
    You simply need to copy the tag.php template from the parent theme folder (wp-content/themes/enfold/tag.php) into your child theme folder (the final file path would look like wp-content/themes/enfold-child/tag.php). You can i.e. use ftp to access these directories/files. Then open up the tag.php (located in the child theme folder) and replace line 114:

    
    'contents'  => 'title',
    

    with:

    
    'contents'  => 'excerpt',
    

    to display the excerpt under the title. Afterwards save the file and upload it into the child theme folder. There’re also other possible values:
    – excerpt_read_more
    – title_read_more
    – only_excerpt
    – only_excerpt_read_more

    You can insert them instead of excerpt to generate a different output.

    Best regards,
    Peter

    #1002688

    Hi Peter
    Excellent, thanks!
    Do you happen to know how to get rid of the extra title container on the page that is giving me all that white space at the top? Or to add some space below the grid?
    Best
    Nancy

    • This reply was modified 6 years, 3 months ago by Munford.
    #1003052

    Hi,

    You can try to remove the white space with this code (add it to the quick css field):

    
    .archive.tag .category-term-description, #top h3.post-title.tag-page-post-type-title {
        display: none;
    }
    

    Best regards,
    Dude

    #1003077

    thanks!
    That worked just fine.
    best
    Nancy

    #1003083

    Hi!
    Great, glad I could help you :)

    Cheers!
    Peter

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘display portfolio tag title’ is closed to new replies.