Tagged: tag page
-
AuthorPosts
-
August 27, 2018 at 4:40 pm #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
NancyAugust 28, 2018 at 8:50 am #1002591Hey 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,
DudeAugust 28, 2018 at 12:48 pm #1002655Hey 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, 2 months ago by Munford.
August 28, 2018 at 1:04 pm #1002662Hey!
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_moreYou can insert them instead of excerpt to generate a different output.
Best regards,
PeterAugust 28, 2018 at 1:35 pm #1002688Hi 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, 2 months ago by Munford.
August 29, 2018 at 10:09 am #1003052Hi,
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,
DudeAugust 29, 2018 at 11:32 am #1003077thanks!
That worked just fine.
best
NancyAugust 29, 2018 at 11:36 am #1003083Hi!
Great, glad I could help you :)Cheers!
Peter -
AuthorPosts
- The topic ‘display portfolio tag title’ is closed to new replies.