Forums

Join
bbPress Support ForumsThemesjquery @ global header

Info

jquery @ global header

  1. hi,

    i know this works for wordpress...
    <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery.js"></script>

    what is the magic bbpress template directory php tag?

    thankees :D

  2. bb_active_theme_uri()

    Maybe you need to use a function as dirname() or other URL function to get the directory string

  3. jQuery is already bundled with bbPress (and WordPress), so you can just use
    <?php bb_enqueue_script('jquery'); ?>
    in your theme's functions.php and it'll automatically be included in your header.

    Same applies for WordPress, but using wp_enqueue_script instead...

    But to answer your original question :P use <?php bb_active_theme_uri(); ?> to output the template directory or <?php get_bb_active_theme_uri(); ?> to return it as a variable.

  4. great, thanks a bunch for the help guys!

  5. You must log in to post.