Archived topic
Add Page Headers to BBpress?
6 replies · Started by Gerik on April 25, 2016
Anyone can direct me?
Currently not possible with the add-on. You would have to use GP Hooks with the is_bbpress() conditional.
Let me know if you need more info :)
more info!
I can not write wordpressnese
So using GP Hooks, you would add something like this to the "After Header" hook:
<?php if ( is_bbpress() ) : ?>
<div class="page-header-image grid-container grid-parent generate-page-header">
<img src="URL TO YOUR BBPRESS HEADER IMAGE" alt="" itemprop="image">
</div>
<?php endif; ?>
Then check the "Execute PHP" checkbox.
Thanks,
To make it a bit more complex I usually have a fluid background image. I put the
- content as . (a period)
- Add Padding
- Add background image
- Container type: FLuid
This is what I done so far.
<?php if ( is_bbpress() ) : ?>
<div class="page-header-content generate-page-header generate-content-header">
<div class="inside-page-header-container inside-content-header grid-container grid-parent ">
<div class="inside-page-header">
.
</div>
</div>
</div>
<?php endif; ?>
and the css as
.bbpress .generate-content-header {
background-image: url(https://s3.amazonaws.com/x.jpg);
background-size: cover;
}
.bbpress .inside-page-header {
background-color: none!important;}
I can't get rid of the white background.
fixed!
.bbpress .inside-page-header {
background-color: transparent;!important;}
Glad you fixed it!
Instead of the period, just use an empty HTML element:
<span></span>
