• Hi,
    This plugin is awesome and better than other popular alternative. I am using Official AMP plugin. Unfortunately this plugin does not work with it. It display the toggle [show/hide] link, but that does not work.
    So my question is:
    1. Can we completely disable it only for AMP pages ?
    2. Is it possible to make it work on AMP as well?

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

    (@theluckywp)

    Hello, @sanjayojha303 !

    We are working on AMP support. But while we can not specify the time when it will be implemented.

    Thread Starter sanjayojha303

    (@sanjayojha303)

    Thank you for prompt response.

    Is it any easy way for now to remove it from AMP page. May be any hook ?

    Plugin Author LuckyWP

    (@theluckywp)

    Unfortunally there is no easy way(

    Thread Starter sanjayojha303

    (@sanjayojha303)

    Hope you add support for this soon.
    For those who needs temporary solution. Remove the shortcode from content using the_content hook. Below is the example.

    
    /**
     * remove toc from AMP pages
     * @param string $content WP Post content.
     * @return string
     */
    function remove_toc_shortcodes( $content ) {
    
    	if ( ! is_amp_endpoint() ) {
    		return $content;
    	}
    	
    	return str_replace('[lwptoc]', '', $content);
    }
    add_filter( 'the_content', 'remove_toc_shortcodes' );
    

    Note: for this, you should disable auto insert and manually add shortcode in your content

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Problem in AMP pages’ is closed to new replies.