bbPress

Simple, Fast, Elegant

bbPress support forums » Themes

Can we do includes?

(6 posts)
  • Started 1 year ago by silverwing
  • Latest reply from silverwing
  • This topic is not resolved

Tags:

  1. Is there a way to add an include in a bbpress theme? I want to add some content in the pages that will change, and I just want to change one file instead of multiple ones.

    Something like this <?php include (TEMPLATEPATH . '/featured.php'); ?> from my wordpress theme. But have featured.php in my bbpress theme folder.

    Posted 1 year ago #
  2. I would put the absolute path and include it in the header.php of your theme if you want it on every page or just include it on specific files if you want it on certain pages.

    Trent

    Posted 1 year ago #
  3. I think it's BBTHEMEDIR. You could also use bb_load_template() I think, which tries to load the filename you give it from the active theme folder.

    Posted 1 year ago #
  4. the absolute path worked fine, but BBTHEMEDIR and bb_load_template() didn't do anything.

    thanks for the help.

    Posted 1 year ago #
  5. BBTHEMEDIR only takes you to the my-templates folder. I'm surprised that bb_load_template() didn't work; ah well, you solved it anyhoo.

    Posted 1 year ago #
  6. I'll admit I'm not that great a coder, so I may have done something wrong when I tried bb_load_template(). I'll try again later and see, since having the whole address isn't the best solution.

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.