• Resolved Kapsule Corp

    (@gothamdev)


    Hello,
    I call my AMP pages this way (?amp=1) and in this case the <? php wp_head (); ?> is not called.

    Problem: since version 4, AIOSEO detects my title tag and systematically deletes it, without replacing it.

    All works fine with precedent version 3.x

    All the best

Viewing 5 replies - 16 through 20 (of 20 total)
  • Plugin Author arnaudbroes

    (@arnaudbroes)

    Hey @gothamdev,

    Sorry, you slipped through the cracks. I originally misunderstood and thought you wanted to disable everything; but now I understand you just want the plugin to rewrite the title. We’re adding a new filter that you’ll be able to use. I’ll reach out once the update where it’s added is released.

    – Arnaud

    Plugin Author arnaudbroes

    (@arnaudbroes)

    @gothamdev so we’ve added a new filter aioseo_meta_views that you should be able to use to achieve this.

    If you only want AIOSEO to rewrite the title and do nothing else on your AMP pages, you can do something like this –

    add_filter( 'aioseo_meta_views', 'aioseo_meta_views_amp' );
    
    function aioseo_meta_views_amp( $views ) {
      if ( isset( $_GET['amp'] ) ) {
          return [];
       }
       return $views;
    }

    I won’t go into the technical details, but the views basically control which information AIOSEO outputs, so if you remove all the views, the only thing that AIOSEO will still do is rewrite the title as that isn’t controlled by a view.

    Let me know if that’s what you’re trying to achieve and if the code above works.

    – Arnaud

    Thread Starter Kapsule Corp

    (@gothamdev)

    I’m sorry to say that, because I see you are doing your best, but it’s still not working.

    – When I use this NEW code it completely removes the title tag from me again in the AMP version. Back to square one. It’s like I don’t put anything in my file

    With the code you gave me previously, balise title is not erase, but title is not good and different with the NON-AMP version :

    add_filter( 'aioseo_disable', 'aioseo_disable_term_output' );
    
    function aioseo_disable_term_output( $disabled) {
      if (isset($_GET['amp'])) {
          return true;
       }
       return false;
    }

    I need to have the same title in AMP/NON-AMP version. But, in AMP i need to have only title tag, in NON AMP, i need also to have all others tags

    Could you contact me in DM, also i could you give URL ??

    All the best

    We’ll get there !

    Plugin Author arnaudbroes

    (@arnaudbroes)

    Hmm, I’m not sure what’s happening on your website then since that code totally works for me. Do you mind reaching out to us here – https://aioseo.com/contact/. That way we can follow up more quickly. You can click the “Submit a Form” page and ask for me specifically.

    – Arnaud

    Thread Starter Kapsule Corp

    (@gothamdev)

    It’s done !
    Thanks ??

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘How can I prevent AIOSEO 4 from removing my title tag in AMP?’ is closed to new replies.