• Resolved frenchomatic

    (@frenchomatic)


    In translation settings, the Tag (archive title) doesn’t change when it is modified from Tag:.

    This means editing features.php or placing something like this into functions.php to remove category: or tag: being rendered on the page. This function deals with the failure in the plugin.

    add_filter( ‘get_the_archive_title’, function ($title) {

    if ( is_category() ) {

    $title = single_cat_title( ”, false );

    } elseif ( is_tag() ) {

    $title = single_tag_title( ”, false );

    }

    return $title;

    });

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter frenchomatic

    (@frenchomatic)

    Do you have a better solution? I notice there is very little code being offered to correct bugs and problems on this forum.

    Plugin Contributor ampforwp

    (@ampforwp)

    Hi @frenchomatic,

    I just checked again and it’s working in all designs.
    Where are you checking those titles?

    And we already have that filter in our features.php

    add_filter( 'get_the_archive_title', 'ampforwp_editable_archvies_title' );
    function ampforwp_editable_archvies_title($title) {
    	global $redux_builder_amp;
        if ( is_category() ) {
                $title = single_cat_title( ampforwp_translation($redux_builder_amp['amp-translator-archive-cat-text'], 'Category (archive title)').' ', false );
            } elseif ( is_tag() ) {
                $title = single_tag_title( ampforwp_translation($redux_builder_amp['amp-translator-archive-tag-text'], 'Tag (archive title)').' ', false );
            }
        return $title;
    }

    Please check again and let me know.

    Regards
    Marqas

    Thread Starter frenchomatic

    (@frenchomatic)

    Yes I saw the filter you have in the plugin but it doesn’t fire for me on tag pages – I wonder why not. Even if I remove this and replace

    $redux_builder_amp[‘amp-translator-archive-tag-text’], ‘Tag (archive title)’)

    with ” (nothing).

    You can see the issue in the genesis test system I set up and sent to you. Goto the site map and click on a tag. Then look at the AMP version.

    • This reply was modified 7 years, 4 months ago by frenchomatic.
    Thread Starter frenchomatic

    (@frenchomatic)

    I have determined that for me a tag page doesn’t use this filter at all. I can see that we go into archive.php for design2 and that h1 fires (I added a class to it just for styling).

    <?php if ( is_archive() ) { ?>
    <div class=”amp-wp-content amp-archive-heading”>
    <?php
    the_archive_title( ‘<h1 class=”amp-wp-title”>’, ‘</h1>’ );

    $arch_desc = $sanitizer->get_amp_content();
    if( $arch_desc ) { ?>
    <div class=”amp-wp-content taxonomy-description”>
    <?php echo $arch_desc ; ?>
    </div> <?php
    } ?>
    </div>
    <?php

    Thread Starter frenchomatic

    (@frenchomatic)

    Found it and it is my fault – basically I was removing the filter in my function to set the SEO title tag. Sorry.

    Thread Starter frenchomatic

    (@frenchomatic)

    Until there is an integration with Genesis SEO it means I have little choice but to remove the word tag: adding in this filter in my SEO function

    add_filter( ‘get_the_archive_title’, function ($title) {
    $title = single_tag_title( ”, false );
    return $title;
    });

    Plugin Contributor ampforwp

    (@ampforwp)

    Hi @frenchomatic,

    We are going to add the compatibility with Genesis very soon.

    Regards
    Marqas

    Thread Starter frenchomatic

    (@frenchomatic)

    Excellent news – it is going to be a pain for sure. Be aware that many Genesis themes use widgetized home pages.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Tag (archive title) – not changing’ is closed to new replies.