Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to remove theme’s header from profile pages?


  • snazzypack
    Participant

    @snazzypack

    Hi all, I have a web and it looks nice except when you visit the profile pages.

    I have it set up where you can see the user’s profile images (avatar) as well as a cover image that is above it. I will show you a pic of what I am talking about. I want the themes header removed, but I have no idea how yo remove it. I even viewed the source code or whatever and my css tweaks did nothing. All help is appreciated.

    How do I remove that dark grey header that says admin and all??

Viewing 1 replies (of 1 total)
  • This requires an understanding of the WP approach to template parts and creating child themes (if you’re not already running as a child theme) plus the BuddyPress template hierarchy as outlined in our codex.

    One approach would be to take advantage of the ability to call named template parts in WP so get_header() can become get_header('no-logo') which would then look for a file namedheader-no-logo.php

    A copy of header.php renamed to header-no-logo.php means you can now call a file that you can specifically modify – in this instance in the simplest terms you could remove any calls to rendering logos/backgrounds in this file.

    Running your BP templates in your theme or child theme (see the bp codex templating guides) would then mean you could run a conditional query to see if in buddypress.php which get_header() template to use by using a check for bp_is_user() but you’ll need moderate php skills for this.

    The better approach is to use the advanced BP template hierarchy which would allow you to create a file to act as index.php with all header/footer calls just for BP user screens.

    The easy or possibly easier approach but not one I advice is to do what you have mentioned you have tried in using styles to hide the elements.

    You’ll need a top level class identifier so we know it’s the BP screens we’re looking at and applying rules to:

    body.bp-user .logo-element {display: none;}

    I can’t advice what the correct selectors are as I’ve no notion of your themes structure, you’ll need to identify them and test until you find the right combination.
    `

Viewing 1 replies (of 1 total)
  • The topic ‘How to remove theme’s header from profile pages?’ is closed to new replies.
Skip to toolbar