• Hi.
    How can I customize button that enables via amp_sidebar() function?
    I have to add “data” attribute to div with role button:

    <div on="tap:sidebar.toggle" role="button" tabindex="0" class="amp-sidebar-button"> <a href="#" class="amp-sidebar-toggle"> <span></span> <span></span> <span></span> </a> </div>

    and remove tag “a” inside it.

    • This topic was modified 4 years, 1 month ago by rewollof.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    You can use this filter to customize buttons ampforwp_the_content_last_filter.

    Thread Starter rewollof

    (@rewollof)

    add_filter('ampforwp_the_content_last_filter', 'test_text');
    function test_text(){
    	return 'this is test text';
    }

    I’ve put it in functions.php of awp-theme-framework theme and just see white screen. Can you tell me what I have to write here please?

    Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    Sorry for delay in response. You need to replace the markup preg_replace using regex. And use ampforwp_minify_html_output for understanding it better.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Button customize’ is closed to new replies.