• Resolved windowframe10

    (@windowframe10)


    Hi,

    I have the plugin installed and am using it in paired mode. I am using a custom template for posts. When I go to mydomain.com/blog/mypost/amp everything works perfectly and I get no validation errors from amp. The main reason I am still using the plugin is to strip and/or convert code to an amp valid format.

    In wp-admin, every post has a variety of warnings. The warnings are related to plugins (in this case disqus and “page links to”). The Amp for WordPress plugin rightly strips these invalid scripts etc out, so they are not output in my template. However the list of warnings in the backend would cause alarm to users etc. Is there a way to dequeue this scripts on the admin side?

    Extra info: My template doesn’t use the standard editor content at all, it’s an ACF flexible field/repeater setup, hence using a custom page template. The Amp for wordpress plugin works to great to convert things like embeds/images to the amp version within all these ACF fields.

    Is there a way to disable these errors or do I have to write a custom script to convert markup to amp valid markup?

    Thanks,
    Pete

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    Are you using amp theme support? If not, update the 0.7.1 and the warning notice will be omitted.

    Thread Starter windowframe10

    (@windowframe10)

    Hi and thanks for the reply.

    Yes, here is my code (which is called on init):

      namespace Amp;
    
      function add_amp_theme_support() {
        add_theme_support('amp', [
          'template_dir'       => 'modules/blog/src/amp',
          'available_callback' => 'is_singular',
          'comments_live_list' => false,
        ]);
      }
      add_action('after_setup_theme', '\Amp\add_amp_theme_support');

    I have 0.7.1 installed.

    Thread Starter windowframe10

    (@windowframe10)

    Hi @westonruter, would you able to offer any more advice on this? Amp validation error warnings are stacking up.

    Plugin Author Weston Ruter

    (@westonruter)

    @windowframe10 If you update to beta1 then you’ll be able to have much better control over the handling validation errors as you’ll be able to mark some as “accepted” so that they will no longer be reported: https://make.xwp.co/2018/07/06/amp-plugin-release-v1-0-beta1/?amp

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Errors – but not on frontend’ is closed to new replies.