Jump to content

Archived

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

ovidiuav

Different headers for different pages?

Recommended Posts

ovidiuav    0
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    547
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    0
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+    3
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+    3
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    547
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    547
Rob

Glad to help!


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
lifelikelife    2
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    1,327
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.

  • Like 2

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
flourishdesignstudio    9
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+    2
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    436
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    20
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.
  • Like 1

Share this post


Link to post
Share on other sites
jeomiland+    2
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+    2
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    2
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

    • JawDesigns
      By JawDesigns
      Hi everyone,
      Flywheel have reported errors on my clients site 'www.racewaredirect.co.uk' and it's not loading. Can someone please provide some information on how to fix this? The site has never experienced these issues before.
      Thanks,
      James Wilson
    • MissT
      By MissT+
      Hi there,
      I've got an issue with 3 websites built with DMS since I migrated them from http to https that I need help with please.
      When any changes are made - e.g. new posts added or existing posts amended - certain sections of the live site seem to break e.g. image headers hang and don't load (b/g on canvas section), sliders hang and don't load (Revslider), flipper section doesn't load.
      Logging in and then clicking 'Edit the site using DMS' seems to fix the problem. Often if I try to open up another browser window to edit the site / re publish I'm unable to as the page wont load / hangs while trying to load.
      Any ideas how to fix this? On a couple of the sites I've installed a caching plugin as I thought it might be a loading speed issue but it's still happening.
      Website URL's can be provided privately.
      Many thanks in advance.
    • jeomiland
      By jeomiland+
      Hi
      I found this topic
      which talks about a similar issue I am having, but a little different. Hope someone can help me out.
      Best way to see the problem is to view http://cassclayton.com/ on Safari (Mac) compared to Firefox or Chrome. You will see the banner just under the fixed menubar has a gap between the menubar and top of the banner. Looking at Inspector, I found:
      <div class="fixed-top-pusher" style="height: 62px;"></div>
      <script> jQuery('.fixed-top-pusher').height( jQuery('.pl-fixed-top').height() ) </script>
      and indeed it seems the jquery is not always working consistently. For instance, if you simply refresh the page in Safari, it will loose the gap and all looks fine, so is it a browser cache issue that is interacting with the jquery? I do have W3 Total Cache installed. There must be a way to tell the code to make sure jquery is up and running and available to do it's majic?
      And perhaps there is just a better way to do this banner? Originally I tried several DMS sections and used the banner image as background, etc... Kept running into problems with resizing and the left/right parts of the image were getting chopped off. It is important the whole image show, so currently I just use a NextBox section with this code:
      <img src="[pl_site_url]/wp-content/uploads/2015/12/CassClayton-blues-tribute-banner.jpg" width="100%" />
      and it looks the way it should. Is there a better way to place a banner graphic under a fixed navbar and make sure the whole banner graphic displays regardless of screensize?
       
    • oseehys
      By oseehys+
      Hello There,
      So i want to use platform 5 and DMS sections on a single page, i am using a child theme with pinspro as my main theme and i activated platform 5, the only problem am having so far is the fixed option, my navbars are not aligning to their default size, and it will be great if platform 5 header and footer section will function, has anyone used this option, how can i make the best use of platform 5 and DMS on a site
      Cheers
    • kwaoru
      By kwaoru
      Hi,
      I desperately need to deactivate the responsive function on mobile for reasons. It looks so messy with the responsive look on mobile and not navigating or informative at all as it is. 
      I searched for solutions online and tries some of those that I found but nothing worked out. Also I found a previous post on this forum says that this theme pagelines DMS is not meant to be build to deactivate the responsive function... 
      Also tried with widget such as WPtouch to edit the mobile look a little more informative but as I am using "single page" theme on pagelines, the frontpage(main page) never appears on those app.
      Seems like not compatible?
      If there is no way to deactivate responsive function or I'll have to recreate another page just dedicated for a mobile page? or change the theme completely and build a page from scratch?
      I have been searching for this for two days already...
      Could anyone wise and kind out there, please help me?
       
      Thanks,
×