-
AuthorPosts
-
October 30, 2019 at 10:21 pm #1152534
Hello
I’ve looked at this post –
https://kriesi.at/support/topic/post-title-tag-page-post-type-title-change-title/
But the latest has different code, so I don;t know what to edit –$label = apply_filters('avf_tag_label_names', $post_type_obj[$key]->labels->name); $output .= "<{$heading} class='post-title tag-page-post-type-title {$css}'>{$label}</{$heading}>";
I want to be able to replace the generic word ‘Posts’ with whatever tag was clicked, eg, ‘USA’. I would also like to add in some text that says something like ‘Tag results for’ before the tag name, eg, ‘USA’.
Please advise and thank you in advance.
November 4, 2019 at 1:20 pm #1153691Hey webWahine,
Sorry for the late reply, I tried to take a look at your site but it seems down right now, but I was able to achieve this please edit the file /enfold/tags.php and at about line 125 you will find:$label = apply_filters('avf_tag_label_names', $post_type_obj[$key]->labels->name); echo "<{$heading} class='post-title tag-page-post-type-title {$css}'>{$label}</{$heading}>";
Please note this code is also at line 75, but you need to edit the code at 125.
change to:$label = apply_filters('avf_tag_label_names', $post_type_obj[$key]->labels->name); $current_tag = single_tag_title("", false); echo "<h3 class='post-title tag-page-post-type-title'>Tag results for ".$label."<span>: ".$current_tag."</span></h3>";
for this result:
to remove the text “Posts” use this code:$label = apply_filters('avf_tag_label_names', $post_type_obj[$key]->labels->name); $current_tag = single_tag_title("", false); echo "<h3 class='post-title tag-page-post-type-title'>Tag results for<span>: ".$current_tag."</span></h3>";
Best regards,
MikeNovember 4, 2019 at 11:06 pm #1153786That worked perfectly! Thank you so much :) All done!
November 5, 2019 at 1:26 am #1153813Hi,
Glad we were able to help, we will close this now. Thank you for using Enfold.For your information, you can take a look at Enfold documentation here
For any other questions or issues, feel free to start new threads in the Enfold forum and we will gladly try to help you :)Best regards,
Mike -
AuthorPosts
- The topic ‘Change page title for tag click results’ is closed to new replies.