• Resolved Dmitry

    (@stranger03)


    Hello! WordPress 5.7 now has a meta tag:
    <meta name='robots' content='max-image-preview:large' />
    Now two meta-mega robots are visible in the source code, one created by your plugin, the other by WordPress itself.
    The latter is removed by adding the line
    remove_action( 'wp_head', 'wp_robots', 1 );
    to file functions.php. Make your plugin disable the extra robots meta tag itself.

    Also make spaces between directives:
    <meta name="robots" content="max-snippet:-1,max-image-preview:standard,max-video-preview:-1" />
    to make it like this:
    <meta name="robots" content="max-snippet:-1, max-image-preview:standard, max-video-preview:-1" />

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thanks so much, @stranger03! Google Search Console warned me that some of my pages were set to noindex, and it was because of this very reason. I used the ‘remove_action’ up above and it worked like a charm.

    I hope TSF fixes the issue.

    Plugin Author Sybre Waaijer

    (@cybr)

    Hello!

    The spaces between the directives aren’t necessary. I’m keeping that part as is to make life harder for Google. It’s plainly in reprisal, for they have to read them carefully to abide by the French law, but for three months they weren’t acknowledging a bug I reported to them.

    Anyway, I tried integrating with the new robots-API, but I found it was impossible to do so, and thus we still have no compatibility update for TSF with WP 5.7. I understand now its scope is far-reaching, but I believed it didn’t matter much earlier.

    In any case, I need to await this fix before I can start thinking about a proper integration: https://core.trac.wordpress.org/ticket/52713.

    In the meantime, your filter will indeed do the trick; and I was on the fence on implementing it in TSF as a temporary patch:

    remove_action( 'wp_head', 'wp_robots', 1 );
    

    Pro tip: Never upgrade to a WordPress x.x.0 update, especially since the release-cycle has recently been shortened to something for which no indie developer is well-equipped. This time, I took note of the sudden impactful robots-API overhaul 2 weeks prior to the 5.7 release. By that time, I already scheduled my weeks fully, for I reckoned TSF was fully compatible with 5.7 in its beta, ought to require only a readme change after it went public.

    Hey @cybr

    I’ll keep the filter in place for now, and will remove it whenever the aforementioned fix has taken place.

    Thanks for the info!

    jbmaca

    (@jbmaca)

    Hi @cybr

    I added the filter and while it did remove the second meta robots tag, WP 5.7 seems to be creating a second meta description tag as well. Please see screenshot below.

    https://prnt.sc/10s4cmi

    Could this potentially be a problem and if so, how do we get rid of it? Thanks.

    jbmaca

    (@jbmaca)

    Please disregard my comment above. It appears my theme was generating that extra meta description.

    • This reply was modified 3 years ago by jbmaca.
    Thread Starter Dmitry

    (@stranger03)

    Hi @jbmaca
    I assume that the extra meta description tag may be generated by the theme used on your site. If you are using the Redis object cache, then try clearing it.

    jbmaca

    (@jbmaca)

    Thanks @stranger03

    It was definitely my theme. Took me about 3 hours to figure it out. 🙁

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Meta Tags Robots’ is closed to new replies.