Jump to content

Archived

This topic is now archived and is closed to further replies.

ovidiuav

Different headers for different pages?

Recommended Posts

ovidiuav

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
Rob

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?


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
ovidiuav

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
dhrose

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
dhrose

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

Share this post


Link to post
Share on other sites
Rob

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/


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
Rob

Glad to help!


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
lifelikelife

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
Danny

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.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
flourishdesignstudio

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
jeomiland

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
James B

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.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
thebastion
Functions.php and an if statement. If pages blah1 - blah 15 show this header else display the normal header.

WordPress codex, have a dabble.

Share this post


Link to post
Share on other sites
jeomiland

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
jeomiland

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
onlinetracker

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

  • Similar Content

    • Paul
      By Paul+
      I was surprised to see I had no menu today - out of the blue - its actually moved to the bottom of the page!  After hours of fiddling and disabling every single plugin, leaving just plagelines the issue is still present.  See video for a basic text box - I moved it into the head and it jumps to the bottom and shows just above the footer but below the main content.  I have a temp fix by placing the menu into the first row on the main content but it does mean other than my home page, all other pages have no menu.  A quick fix is very urgent for this bug.
      https://thelaptopfixers.com
       
       
    • russe-intensif
      By russe-intensif+
      Hi team,
      checking my site today, i'm surprised to see my MegaNav all in bottom of the pages, while it's in header.
      After getting to change it in couple of pages onto Template part (too time consuming !), i'm desperate and ask you for help :-)
      apprendre-le-russe-avec-ania.fr
      Thank you in advance !

    • Steve Webb
      By Steve Webb+
      I am having an issue with DMS editor not loading.  Just keeps spinning and spinning.
      Have tried several things - Logged in and out, cleared cache, deactivated all plugins, but the issue persists.
      I even had our host restore from a backup a few weeks ago, when I know it WAS working, as I edited a text box on the homepage.  The restore from backup didn't help either.
      Also, the front end of the site shows that the site is framed, or boxed now (whatever you call it), instead of full width as it was previously (last week).
      Dev console shows that there are php errors in Google maps - file is attached.
      Can someone please help?  Not sure what else I can do here...
      Thanks in advance.
      -Matt

    • tuciudadenred
      By tuciudadenred+
      Hi everyone, what happens is that the web page metrosalarmas.com has a google tags which I have not attacked where I can look to remove those tags and be able to locate the correct ones.
    • Steve Webb
      By Steve Webb+
      I am having an issue with DMS editor not loading.  Just keeps spinning and spinning.
      Have tried several things - Logged in and out, cleared cache, deactivated all plugins, but the issue persists.
      I even had our host restore from a backup a week ago, when I know it WAS working, as I edited a text box on the homepage.  The restore from backup didn't help either.
      Also, the front end of the site shows that the site is framed, or boxed now (whatever you call it), instead of full width as it was previously (last week).
      Dev console shows that there are php errors in Google maps - file is attached.
      Can someone please help?  Not sure what else I can do here...
      Thanks in advance.
      -Matt

×