How to use custom script in amp page
-
Hello,
i am trying to amp-script in my footer.php like this :“<div id=”fb-root”></div>
<script>
(function($){
if(!$(‘.page-id-2906’).length){
$(document).ready(function(){
$(‘nav.main_menu’).addClass(‘hide_content’);
});
}
})(jQuery);
</script><amp-script>
alert(“dfgdfg);
</amp-script><?php
/* Always have wp_footer() just before the closing </body>
* tag of your theme, or you will break many plugins, which
* generally use this hook to reference JavaScript files.
*/
wp_footer();?>
</body>
</html>
”
but not work event it’s not showing on browser inspect
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘How to use custom script in amp page’ is closed to new replies.