Info
- 6 posts
- 3 voices
- Started 4 years ago by silverwing
- Latest reply from silverwing
- This topic is not resolved
Can we do includes?
-
- Posted 4 years ago #
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 4 years ago #
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 4 years ago #
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 4 years ago #
the absolute path worked fine, but BBTHEMEDIR and bb_load_template() didn't do anything.
thanks for the help.
-
- Posted 4 years ago #
BBTHEMEDIR only takes you to the
my-templatesfolder. I'm surprised that bb_load_template() didn't work; ah well, you solved it anyhoo. -
- Posted 4 years ago #
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.
-
You must log in to post.