[Resolved] Bigfoot.js works in Customizer but not on live site

Home Forums Support [Resolved] Bigfoot.js works in Customizer but not on live site

Home Forums Support Bigfoot.js works in Customizer but not on live site

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #392714
    jbpyn

    I’m having a strange problem. I have setup the child theme, added the Bigfoot file accordingly and ammended the functions file with this:

    add_action( 'wp_enqueue_scripts', 'tu_enqueue_bigfootjs' );
    function tu_enqueue_bigfootjs() {
        wp_enqueue_script( 'bigfoot.js', get_stylesheet_directory_uri() . '/bigfoot/bigfoot.js', array('jquery'), false, false );
        wp_enqueue_style( 'bigfoot-default.css', get_stylesheet_directory_uri() . '/bigfoot/bigfoot-default.css' );
    }
    
    add_action( 'wp_footer', 'tu_add_bigfootjs' );
    function tu_add_bigfootjs() { ?>
        <script type="text/javascript">
            jQuery.bigfoot(
    		{
    			numberResetSelector: "article"
    		}
    	);
    </script>
    <?php }

    When I open up the Customizer to preview the footnotes, they work perfectly. But once I test the live site, the script doesn’t run so I’m left with ordinary footnotes. I can’t get Piwik to track anything either, so I suspect the same problem is affecting both scripts?

    Please help

    #392917
    Leo
    Staff
    Customer Support

    Any caching plugins?

    #392996
    Tom
    Lead Developer
    Lead Developer

    Can you link us to the site possibly?

    #393262
    jbpyn

    Bingo, it was the Auto Optimizer caching plugin. Seems really obvious now. It shouldn’t have been there anyway. Thanks for the tip off.

    #393838
    Leo
    Staff
    Customer Support

    Glad we could help!

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.