Site logo

Archived topic

Page Header & BuddyPress Codes Not Working

7 replies · Started by Yomi on June 27, 2016

Viewing posts 1–8 of 8

Hi Tom,

The “Page Header” Add-on seems not to be working with the buddypress activity, groups or members page anymore with the codes you have supplied on this page.

buddypress codes

I have use the following codes inside the “After Header” hook, selected the php box, but all the contents display throughout the site in the "After header" position and not the specific pages where the content is supposed to appear

Below are the contents i placed in the after header hook

<?php if ( function_exists( 'bp_is_active' ) ) : ?>

<?php if ( bp_is_active( 'activity' ) ) { ?>

This is where you put what you want to show up in here (and delete this text).

For example, an image:

Or just regular text and HTML - it's up to you.

Just make sure not to touch any of the surrounding markup :)

<?php } ?>
<?php endif; ?>

Is this code still working or another code available

Kind regards

Hi there,

Can you re-post the exact code you're using, but highlight it and click the "code" button in the editor so it formats it nicely?

That would help me see what's going wrong :)

The exact code I am using are as follows:


<?php if ( function_exists( 'bp_is_active' ) ) : ?>

    <?php if ( bp_is_active( 'activity' ) ) { ?>
        <div class="page-header-content generate-page-header generate-content-header">
            <div class="inside-page-header-container inside-content-header grid-container grid-parent">
                
                
                This is where you put what you want to show up in here (and delete this text).
                
                For example, an image:
                <img src="URL TO YOUR IMAGE" alt="" />
                
                Or just regular text and HTML - it's up to you.
                
                Just make sure not to touch any of the surrounding markup :)
                
                
            </div>
      </div>
    <?php } ?>
<?php endif; ?>

Which hook are you adding it to? Is "Execute PHP" checked?

The above should input content to the activity page in BuddyPress - I doubt their conditionals have changed.

Yes “Execute PHP” is checked.

If nothing is showing, it means:

a) One of the conditionals isn't correct (function_exists( 'bp_is_active' ) or bp_is_active( 'activity' )).
b) The hook you're adding it into isn't displaying on that page.

Okay... thanks for taking the time to look at the code.

Might have to check if it is a plugin conflict causing the problem

Kind regards

No problem :)

This archived topic is closed to new replies.