• 0

Different headers for different pages?


Question

Posted · Report post

Hi! Is it possible to have a different header for each page on my blog?

 

My header has 2 columns and on 2 of my pages I want to delete one column and have the remaining one span across the full width of the region. Thanks in advance!

Share this post


Link to post
Share on other sites

18 answers to this question

  • 0

Posted · Report post

My first question is, why would you do that, as it will adversely affect your SEO?

 

Next, you can add sections to your header that may call dynamic content, but with that, you have the issue of search engines not finding consistent information needed for your placement.

 

Wouldn't it be best to keep the consistent information there for SEO, and add some secondary rotating info in another section, still in the header?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

SEO isn't really a concern. I take it there's no way to change the header any way I like on just one page without it affecting the header everywhere?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Er, was wondering this myself... I want to have a different header (size) on the jump pages then on the first page... Also I was thinking to put the full width slider in the header area, but that's not what I want on other pages, so it seems that the "header" area is not the place to put these types of objects?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

There is a local and global setting for header... what's that do currently?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Okay, here's an idea, for what it's worth.

 

Add a sidebar to the header.

 

Implement Widget Logic on your site, or something similar. 

 

Add widgets to your sidebar, containing the changing content.  Using Widget Logic, tell the widgets where to appear.  

 

If you tell the widgets to appear only on category 27 or page 139, that's where they'll appear, only. You can use the same sidebar, with as many widgets as you like and change the content (in your header) as much as you please.   Just make sure you fully study the Conditional Tags reference in the Widget Logic instructions.  We don't support those, so you'll pretty much have to learn it.

 

http://wordpress.org/extend/plugins/widget-logic/

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thanks!

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Glad to help!

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Damn, so no different headers for different pages? :(

 

I'm making a squeeze page, I don't want it to have the same header as the rest of the site, I don't want any header at all.

 

Is it possible to remove the header for one page? I created a new 'squeeze' page template but it still seems like the header is universal across all templates.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

The Header area is a global template, meaning that is it global through your site, so its not actually possible without custom code or the use of a plugin as Rob suggested above.

However, this is a pretty decent idea so I will add it to our issue tracker as a feature enhancement so our developers are aware of what the community want.

2 people like this

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I am looking for a similar solution but explaining the problem might help in this case. I am working on a site for a yoga business that has two locations: Location A and Location B. We would like to have a landing page that asks you to choose your preferred location (a or b ). Then, once you click on the location it would be great to have a different header for the two locations. 

 

For example if you choose location A then the navigation in the header would be Home, Schedule (for location A), Contact (for location A), etc. Then, If you chose location B from the landing page I want a separate header that has navigation for that studio such as Home, Scehdule (for location b, Contact (for location b, etc. I know I can make a menu for each one but the problem comes with there being a universal header. Any suggestions on how to make this work better within DMS system?

 

Thanks in advance!

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

RE: removing header

Another posted mentioned setting up a CSS style with position:absolute: left:-1000px; and applying that to just the home page css (in my case, need no header on home page and a standard on inner pages - also need different page background on home page and inner pages...)  But to WHAT element will this style be attached???

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Flourishdesigns - hi there, the only way I can think to do this within the universal header would be to add both in to the header then use css to hide/display based on the page id.

 

So in the header, place the two navbars with the different menus in, your logos etc, each within their own column so it groups it together. So column for location a info, another for b. Give each of those columns a stlye class in the column settings.

 

Then use css to display/hide based on the pages you want each to show up on.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Functions.php and an if statement. If pages blah1 - blah 15 show this header else display the normal header.

WordPress codex, have a dabble.
1 person likes this

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Do you recall what to search for in WP docs to fine definition/syntax of PAGE ID's onto which we can attach functions defined in the functions.php?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

jeomiland

http://codex.wordpress.org/Conditional_Tags

 

You would need to add your custom PHP to the functions.php file in either the customize plugin or base child theme.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi guys

Thanks for the suggestions.

Here's what I did to make the header go away on my home page and just display on inner pages:

 

<?php //  ### JEO add code to Not display Header stuff if on "home" PAGE
    if (!is_front_page()) { ?>                    
                    <header id="header" class="header pl-region" data-region="header">
                        <div class="outline pl-area-container">
                            <?php pagelines_template_area('pagelines_header', 'header'); // Hook ?>
                        </div>
                    </header>
<?php } // ### END JEO header code ?>                        
 

 

Note the conditional is_front_page() (thanks for reference link Danny). I have this in the header.php file in the DMS theme folder. One can add more logic to have different headers for different pages/conditions. This link is a useful read: http://codex.wordpress.org/Function_Reference/get_header

 

Obviously this is not the best way to do it since the file would get wiped out with DMS updates. Next on to learning how to implement a Child theme - any suggestion on a good tutorial on implementing a child theme within DMS???

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

There is a plugin called Dynamic Headers, not sure if you said somewhere that it wasn't an option, but it is available to try out. Hasn't been updated for a while though.

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