Skip to:

Extra Stylesheets & Javascript being added in the footer?

  • 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='' type='text/css' media='all' />
    <link rel='stylesheet' id='bp-admin-bar-css'  href='' type='text/css' media='all' />
    <script type='text/javascript' src=''></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)

  • Henry


    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