This topic has 7 replies, 3 voices, and was last updated 8 years by Radu.

  • Author

    Tagged: 

  • #63601
     Webmaster4you
    Participant

    Hi 🙂
    If I remove this line from the home.php file
    <?php get_template_part(‘page-parts/buddypress-profile-header’);?>

    I get rid of the header on all pages but I want to only remove it on specific pages like the messages page and the edit my profile page what can I do?

    any ideas?

    Best regards
    Michael

    #63873
     Radu
    Moderator

    Hi,

    Add this file ( header.php ) to your kleo child root directory.

    Then in contact ,blog and member profile page the header will by hidden.

    You can add or remove pages from line 69.

    Example

    COPY CODE
    
    <?php if (is_page (array( 'contact', 'blog' )) || bp_is_my_profile() ) {
    
    COPY CODE
    
    <?php if (is_page (array( 'contact', 'another-page-slug' )) || bp_is_my_profile() ) {
    

    Something like that,

    Hope it's ok for you

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    Attachments:
    You must be logged in to view attached files.
    #64011
     Webmaster4you
    Participant

    Hi Radu 🙂
    Yes, that does work and thank you.

    The only thing is it removes the theme header and not the page-parts/buddypress-profile-header. The header I need to remove on certain pages is the one showing profile data.

    <?php get_template_part(‘page-parts/buddypress-profile-header’);?>

    Located in home.php in the folder wp-content/themes/sweetdate/members/single

    it is the script buddypress-profile-header.php
    located in the folder /page-parts

    Is ther somewhere else I can add this code

    <?php if (is_page (array( ‘messages’, ‘profile’ )) || bp_is_my_profile() ) {

    } else { ?>

    to exclude the buddypress-profile-header

    Best regards
    /Michael

    #64272
     Radu
    Moderator

    Replace that file wp-content/themes/sweetdate/members/single/home.php with attached file.

    It should be your solution.

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    Attachments:
    You must be logged in to view attached files.
    #64274
     Radu
    Moderator

    Or use sweetdate-child by placing the file in the next path : wp-content/themes/sweetdate-child/members/single/home.php

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #64376
     Webmaster4you
    Participant

    Perfect…
    Thank you!!!

    #66689
     samnoonan
    Participant

    Hi, I am using the above code and it works on most pages, but I’ve got 2 it won’t work on and I also want the header on the actual profile. It won’t work on the locaation, or settings pages. Thank you

    #69483
     Radu
    Moderator

    Hi,

    Sorry, but to achieve this, a few more tweaks will be required and i recommend you to hire a developer for this.
    This isn’t an option either from buddypress or our theme.

    Thank you for understanding.

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 8 posts - 1 through 8 (of 8 total)

The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?