• Resolved Santiago

    (@farizano)


    Can I exclude or disable some elements using a function or php script in transitional mode?
    Some scrips and forms cause amp errors in search console and I want to exclude in amp pages.

    Thank you

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Santiago

    (@farizano)

    I’ve used:

    if ( function_exists( ‘is_amp_endpoint’ ) && is_amp_endpoint() === false ) {
    // Excluded content
    }

    And seems to work

    Plugin Author Weston Ruter

    (@westonruter)

    Yes, that’s the function to use.

    You might want to tweak the conditional a bit in case the AMP plugin is deactivated:

    if ( ! function_exists( 'is_amp_endpoint' ) || ! is_amp_endpoint() ) {

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disable elements’ is closed to new replies.