Page Header & BuddyPress Codes Not Working

Home Forums Support Page Header & BuddyPress Codes Not Working

Home Forums Support Page Header & BuddyPress Codes Not Working

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #204839
    Yomi

    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

    • This topic was modified 7 years, 9 months ago by Yomi.
    • This topic was modified 7 years, 9 months ago by Yomi. Reason: missed out some bits
    #204938
    Tom
    Lead Developer
    Lead Developer

    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 🙂

    #204945
    Yomi

    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; ?>
    #205010
    Tom
    Lead Developer
    Lead Developer

    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.

    #205013
    Yomi

    Yes “Execute PHP” is checked.

    #205016
    Tom
    Lead Developer
    Lead Developer

    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.

    #205139
    Yomi

    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

    #205176
    Tom
    Lead Developer
    Lead Developer

    No problem 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.