• Earlier I had quarry form in all of my pages and post. 2 months ago I started trail with AMPforWP and I learnt AMP and Ninja forms don’t works togather.

    So I added buttons everywhere in AMP version, all leading to Ninja form on Landing page. When I did “AMP takeover” my Ninja form went missing from landing page too (Though I had opted for “No AMP display” in page setting.

    Is there any way we can remove at-least one page from AMP take over? Because If client can’t sent their requirement in quarry form, speed is of no use to me

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • That is a good question under AMP takeover.

    Try this in your functions.php file (although I put it at the top of the includes/redirect.php file for testing)

    function my-special-no-amp-pagep(){ 
       if(is_page('your-page-name')){
        remove_action( 'template_redirect', 'ampforwp_check_amp_page_status');
      }
    }
    
    add_action( 'template_redirect', 'my-special-no-amp-page',9);

    You obviously replace ‘your-page-name’ with what it actually is in the url path. Then in your wp admin set the show amp page in the sidebar to off for that specifc page. This works for me.

    Thread Starter joyloan

    (@joyloan)

    I know I may sound foolish,

    But I don’t know where is functions.php

    For some time, I searched google which said it can be found in theme directory. But in theme directory, there is no separate folder for AMPforWP.

    I added your code to my both themes twentyseventeen and customizer, but it did not worked.

    In AMPforWP setting, design section there is one block for custom CSS, but it did not worked there also.

    So after 5-6 hours trying, I dropped it. Can you suggest where this file can be found for AMPforWP

    Plugin Contributor ampforwp

    (@ampforwp)

    Hello @joyloan

    You can put that piece of code into redirect/or include file as mention by frenchomatic.

    To go to this file please follow the below directory.

    wp-content/plugins/accelerated-mobile-pages/includes.php
    or
    wp-content/plugins/accelerated-mobile-pages/redirect.php

    Thread Starter joyloan

    (@joyloan)

    Hi @ampforwp

    I failed in all ways

    First I went in to folder (public_html/wp-content/plugins/accelerated-mobile-pages) as suggested by you, but did not found any file includes.php and redirect.php

    Then I went to next folder (public_html/wp-content/plugins/accelerated-mobile-pages/includes)

    Copy pasted code as below both in redirect.php and inculdes.php (One by one)

    function my-special-no-amp-pagep(){
    if(is_page(‘save-my-time’)){
    remove_action( ‘template_redirect’, ‘ampforwp_check_amp_page_status’);
    }
    }
    add_action( ‘template_redirect’, ‘my-special-no-amp-page’,9);

    but did not worked. Also I tried removing extra “P” at end of function my-special-no-amp-pagep (I thought it is written by error, as I do not know code)

    In includes.php it gives multiple redirect error
    In redirect.php it opens only a blank page

    Later I came back to (public_html/wp-content/plugins/accelerated-mobile-pages) and created includes.php and redirect.php copy pasted above code and uploaded (tested only 1 file at a time, and removed first before uploading second). Yet nothing happend

    What mistake I am doing? Please suggest me right way to do it

    Plugin Contributor ampforwp

    (@ampforwp)

    Hello @joyloan

    Currently, we don’t have this feature or option for disabling the AMP support on the specicfic page when the AMP take over is enabled.

    But I have made a ticket on GitHub regarding this issue and in the upcoming update, we will add this feature to our plugin.

    Here is the link to GitHub ticket: https://github.com/ahmedkaludi/accelerated-mobile-pages/issues/2153

    Thread Starter joyloan

    (@joyloan)

    Hi!

    Is there some update in AMPforWP plugin for this issue?

    Regards
    Ravinder Bhutani

    Plugin Contributor ampforwp

    (@ampforwp)

    Hello @joyloan

    We are working on this issue and we add this issue to our milestone and in an upcoming update, this problem will be solved.

    Appreciate your patience.

    Thank you.

    Thread Starter joyloan

    (@joyloan)

    Hi @ampforwp on project page, they said it is complete.

    Are you planning to launch it soon

    Plugin Contributor ampforwp

    (@ampforwp)

    Hello joyloan

    Yes, we are going to push an update today and in this update, we will see an option for disabling the AMP support on specific pages.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Is Page Exception Possible in AMP Takeover?’ is closed to new replies.