• 0
Sign in to follow this  
Followers 0

Header


Question

Posted · Report post

Hi,

I put a media box inside the header area... The thing is I need 2 different media boxes, one for the main site and another one for just one page on the entire site. I don't know how to change the media box on a specific page only. I've put local settings option (although it's put on the header setting). It doesn't matter if I set it as local, it will appear only as global.

 

Can I hide the header from a specific page, then?

Share this post


Link to post
Share on other sites

10 answers to this question

  • 0

Posted · Report post

Firstly, the code didn't work as you have added it to the incorrect place, it appears you have added it to the custom scripts editor and not the custom CSS/LESS editor. Also, you haven't edited Robs code and replaced XX with the pages id.

 

At present, it is not possible to have different headers on different pages, as the Header area is a global template area, meaning that anything added to this area will be displayed throughout the site.

 

However, what you can do is this, click edit on the section or sections you wish to hide on that specific page, then in the each of the styling classes add the following:

 

hide-me

 

Once you have added this class, click publish. Now, goto </> Custom and in the CSS/LESS editor add the following code.

 

.page-id-2 {
.hide-me {
     display: none;
   }
}

 

Now you will need to locate your pages id and replace the id of your page with the id in the code i.e. replace 2 in the code with your pages id. You can find your pages id in the body tag when viewing your sites code via PageSource or Chromes dev tools.

 

What this will do is, basically hide any section you add hide-me to the styling classes field, as long as it is on the page you added the id to in the code (if that makes sense).

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

You can hide the entire header for a specific page.

 

Add code like this, replacing XX with the actual page ID number (determined in WP)

.page-id-XX #header {display: none !important;}

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Where should I enter this code?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

It would go in the  Custom area under Custom CSS.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

It didn't do the trick. The text above even appeared on the page, on the right top. Above everything

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Can you provide a link to your site please.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

It worked. Thanks!

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

No problem.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0