Skip to:
Content
Pages
Categories
Search
Top
Bottom

Template tag for calling the template directory

  • I figured this out by accident after not finding much in the forums about it, so I thought I’d post it fresh.

    In wordpress, we use <?php bloginfo('template_url'); ?> to go straight to your template directory (i.e. “http://mysite.com/wp-content/themes/mytheme”).

    In bbPress, to go yout theme directory (i.e. “http://mysite.com/bb-templates/mytheme”), you use <?php bb_option('template_uri'); ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • I guess i was wrong, thought i was working, but it’s not. Does anyone know the proper tag for this?

    This is a guess

    try

    BB_CORE_THEME_DIR for bb-template

    BB_THEME_DIR for my-template

    instead of template_uri


    Sam Bauers
    Participant

    @sambauers

    Use these functions:

    bb_active_theme_uri(); // echos active theme URI
    bb_get_active_theme_uri(); // returns active theme URI
    bb_get_theme_uri( 'user#foobar' ); // returns given theme URI where theme is in "my-templates/foobar"

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

You must be logged in to reply to this topic.