• 0

How do I have different footers on different pages?


Question

Posted · Report post

Hi,

 

I have a pretty basic site where i'm using custom templates. I have one template for my home page, and another one for all other pages (I may add others in future).

 

What I want to do is use the SimpleNav section in the footer of all my pages EXCEPT the home page, where I don't want to have a footer at all. I just can't work out how to do this.

 

Whenever I add SimpleNav to the template I'm using for all my content pages and select Update Template with Current Configuration, it seems to save the changes to all my pages including my home page (which is using a different template).

 

So then, I went to my home page and deleted it, updated that template, and then it was gone from ALL my pages.

 

So I'm assuming that footers are global only??

 

For now, I've managed to make a workaround whereby I've added the SimpleNav section to the bottom of my main content area of the template instead of in the footer, but it's not really a long-term solution. We should be able to have template-by-template control of headers and footers.

 

Thanks, Mark

Share this post


Link to post
Share on other sites

3 answers to this question

  • 0

Posted · Report post

Hi Mark

 

The header and footer a global scope unfortunately, so any sections added will take place on all pages etc.

 

You can place into the layout on all pages and use css to hide it on the homepage. Example below, you'll need to replce the page id and the code after the simple nav ID with the relevant details from your site. You can find these using chrome dev tools or firebug to inspect the page.

 

.page-id-26863 #simple_navu2aw09 {display:none;}

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thanks James,

 

I just tried it and it seems to work! Just what I needed.

 

Mark

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thank you for letting us know this worked for you 

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