Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author James Osborne

    (@jamesosborne)

    You can insert the shortcodes into your content with any AMP plugin and it should work fine. Give it a try and let me know if you run into any trouble.

    Thread Starter Joshua

    (@estudovt)

    The video shows the plugin working on a normal page. Then I add the / amp and it doesn’t work.

    – / This version of wordpress has been installed now and contains only the ampforwp and amp hamburger plugins.

    Plugin Author James Osborne

    (@jamesosborne)

    Thanks for going to the trouble of providing a video, very useful. Please allow me some time to check this before reporting back to you here. I suspect you’ll just need to include the required AMP component scripts to the head of your AMP for WP templates.

    Thread Starter Joshua

    (@estudovt)

    All right, I’ll wait. I want to use your plugin in my next project.
    Thanks.

    Thread Starter Joshua

    (@estudovt)

    I’ll try what you said about “include the required AMP component scripts to the head of your AMP for WP templates ”

    What are the “required AMP component scripts” that I should try to include ?

    Plugin Author James Osborne

    (@jamesosborne)

    Hi @estudovt. Sorry about the delay, I have a solution that needs improvement when time allows. Please add this code snippet:

    add_action('amp_post_template_head','ampforwp_register_analytics_scripts', 88);
     function ampforwp_register_analytics_scripts(){ ?>
     <script async custom-element="amp-accordion" src="https://cdn.ampproject.org/v0/amp-accordion-0.1.js"></script>
    <script async custom-element="amp-sidebar" src="https://cdn.ampproject.org/v0/amp-sidebar-0.1.js"></script>
    <?php
    };
    
    function jozz_ampsidebar_add_head_html2() { 
    ?>
    <amp-accordion id="my-accordion" disable-session-states>
    </amp-accordion><?php
    } 

    You can include it to the end of the amp-sidebar-hamburger-menu/amp-wp-sidebar.php, your themes functions.php file or a custom functions file. Let me know if that works for you.

    • This reply was modified 3 years, 8 months ago by James Osborne.
    Thread Starter Joshua

    (@estudovt)

    It works ! Thanks !

    Plugin Author James Osborne

    (@jamesosborne)

    No problem at all. Best of luck

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to’ is closed to new replies.