• Hi Team,

    I have installed AMP Plugin and enabled for Posts only, However I want to apply AMP on Blog page, Category pages and archive pages.

    Thanks

Viewing 4 replies - 16 through 19 (of 19 total)
  • You can deregister stylesheets using the below approach for transitional mode AMP, you just need to apply each sheets handle.

    add_action( 'wp_enqueue_scripts', function() {
        if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) {
            wp_dequeue_style( 'name-of-stylesheet' );
        }
    }, 1000 );

    AMP works best using the native WordPress editors. I haven’t tested Visual Composer myself so I am unsure how compatible it us with AMP.

    Thread Starter Ashish Jangra

    (@ashishjangra-1)

    Hi James

    Thanks for your reply, i have an idea to remove the Visual composer, I have already mentioned you that our page is built with Visual composer so i can’t remove that style.

    Plugin Contributor Alain Schlesser

    (@schlessera)

    @ashishjangra-1 The 50KB CSS size limit is unfortunately a hard limit by the AMP framework, specifically to disallow tools and practices that produces bloated sites.

    You’ll have to find a way to either manually reduce the amount of CSS that is being pulled in from Visual Composer, or switch to a leaner page builder/framework.

    Alternatively, you can still opt to not serve your frontpage with AMP if it seems too troublesome/costly to get the page to validate.

    Thread Starter Ashish Jangra

    (@ashishjangra-1)

    Hi, Apologies for late reply. we are sorted with all validation and CSS stuff which we discussed. Only 1 issue where i need your help

    AMP is validated on Archive/Tag/Author/Category/Single page.

    Only problem is Blog Home Page.

    In our case Blog Home page is inner page which is (https://bit.ly/320eNAp). We have created a page and set as Posts page (Blog) From Settings >> Reading >> Posts Page >> Blog Selected.

    Please let me know how can we enable AMP of blog page.

    Thanks

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘How to add AMP on Blog Listing, Category & Archive Pages’ is closed to new replies.