Black Friday Sale! Get $20 off GP Premium, $40 off our new Lifetime license, and 45% off license renewals/extensions! Learn more

[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

    GeneratePress 1.4
    GP Premium 1.4.3
    #392917
    Leo
    Staff
    Customer Support
    #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
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.