-
AuthorPosts
-
May 9, 2020 at 12:01 am #1211305
I tried to use the solution in this thread but couldn’t find the exact code. Currently I have page title hidden. At the top of each tag page is the word “Posts” which appears to be the default page description. I would like instead to display the Tag name. Please advise. Thanks!
https://kriesi.at/support/topic/post-title-tag-page-post-type-title-change-title/May 12, 2020 at 12:06 pm #1212113Hey williamslyd,
Now, the code to look for and adjust is this:
$output .= "<{$heading} class='post-title tag-page-post-type-title {$css}'>{$label}</{$heading}>";
And there are at least 3 occurrences in the file enfold/tag.php.
Best regards,
VictoriaMay 15, 2020 at 7:11 pm #1213395I am still confused. I want to change the word “Posts” to “News and Analysis,” followed by a colon and then the tag name. So it will look like this:
News and Analysis: Tag
I would like to know what code I need to change and what to change it to.
Thanks!
Lydia
May 16, 2020 at 7:17 pm #1213642Hi Lydia,
Please try using code like this:
$output .= "<{$heading} class='post-title tag-page-post-type-title {$css}'>{__( 'News and Analysis', 'avia_framework' )}: {$label}</{$heading}>";
If you need further assistance please let us know.
Best regards,
VictoriaMay 19, 2020 at 10:15 pm #1214440I only saw one place where there was language using “output” followed by rest of the string. I saw another place using “echo”. I added it to both places but the only thing that changed is that now the word “Posts” does not display at the top of the tag pages.
I am supposed to replace:
$output .= “<{$heading} class=’post-title tag-page-post-type-title {$css}’>{$label}</{$heading}>”;
}
with:
$output .= “<{$heading} class=’post-title tag-page-post-type-title {$css}’>{__( ‘News and Analysis’, ‘avia_framework’ )}: {$label}</{$heading}>”;Is that correct?
What other code do I need to replace?
Thanks!
May 23, 2020 at 3:06 pm #1215490Hi williamslyd,
Yes, did you replace it? Did you get it working?
Best regards,
VictoriaMay 23, 2020 at 3:41 pm #1215502No, it didn’t work but your instructions said there were three places I needed to replace. I only found one. Could you tell me exactly where the three codes are and are they all exactly the same original code?
May 25, 2020 at 2:28 pm #1216140Hi williamslyd,
You need to use the search and replace feature in your code editor to find all occurrences. I was talking about the tag.php file and you copied the archive.php file. Which pages are you trying to change: category pages or tag pages?
Best regards,
VictoriaJune 3, 2020 at 12:58 am #1218888Maybe I should restate what I am trying to do. Currently, my tag archive pages all have the generic heading “Posts”. I want to replace this with the heading “News and Analysis: {TAG NAME}”. So if a visitor clicks on a tag that is displayed on a particular post named “China”, the China tag page will appear which will have the heading:
“News and Analysis: China” followed by all posts with the China tag.If they click on a post meta tag called Peru, the tag page will have the following heading:
“News and Analysis: Peru”
There are not 3 occurrances of the code you provided in the tag.php file. There is only 1. Could you confirm that your instructions are correct? Thanks so much!
June 5, 2020 at 8:05 pm #1219917Hi williamslyd,
Yes, you’re right. I was talking about archive.php. So you did you adjust the tag.php?
Yes, the instructions are correct.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.