Skip to:
Content
Pages
Categories
Search
Top
Bottom

Extra Stylesheets & Javascript being added in the footer?

  • Profile photo of Unit9
    Unit9
    Participant

    @unit9

    Hi guys, 😀

    I’ve created my own theme based on the Buddypress theme, but some of my CSS changes are being overwritten as this code is inserted after my footer:

    <link rel='stylesheet' id='admin-bar-css'  href='http://idgmr.com/wp-includes/css/admin-bar.min.css?ver=3.7.1' type='text/css' media='all' />
    <link rel='stylesheet' id='bp-admin-bar-css'  href='http://idgmr.com/wp-content/plugins/buddypress/bp-core/css/admin-bar.min.css?ver=1.8.1' type='text/css' media='all' />
    <script type='text/javascript' src='http://idgmr.com/wp-includes/js/admin-bar.min.js?ver=3.7.1'></script>

    So one of these pieces of code within the footer.php is actively inserting the code above:

    <?php do_action( 'bp_footer' ); ?>
    <?php do_action( 'bp_after_footer' ); ?>

    Is there any way to find the code for these two items and can I stop them inserting the CSS?

    Thanks! 😀

Viewing 1 replies (of 1 total)
  • Profile photo of Henry
    Henry
    Member

    @henrywright-1

    Hi @unit9

    You’re right. <?php do_action( 'bp_footer' ); ?> and <?php do_action( 'bp_after_footer' ); ?> are points at which things can be inserted. If you want to remove (dequeue) the CSS documents and script, you can use remove_action()

    See this helpful tutorial on how to remove scripts and styles:

    How to disable scripts and styles

Viewing 1 replies (of 1 total)
  • The topic ‘Extra Stylesheets & Javascript being added in the footer?’ is closed to new replies.
Skip to toolbar