Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #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/

    #1212113

    Hey 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,
    Victoria

    #1213395

    I 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

    #1213642

    Hi 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,
    Victoria

    #1214440

    I 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!

    #1215490

    Hi williamslyd,

    Yes, did you replace it? Did you get it working?

    Best regards,
    Victoria

    #1215502

    No, 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?

    #1216140

    Hi 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,
    Victoria

    #1218888

    Maybe 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!

    #1219917

    Hi 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

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.