Skip to:
Content
Pages
Categories
Search
Top
Bottom

jquery @ global header

  • 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

Viewing 3 replies - 1 through 3 (of 3 total)

  • Olaf Lederer
    Participant

    @finalwebsites

    bb_active_theme_uri()

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

    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.

    great, thanks a bunch for the help guys!

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.