Jump to content
Sign in to follow this  
michaelmiles

Need custom code to enforce sidebar on front page

Recommended Posts

michaelmiles

Been working with Andrew and Jeff on this issue and we confirmed that WordPress is structured to reflect the 'meta' information on the main posts page from the most recent post. To move forward, I need to have some custom code on the main 'front' page (all posts/summary) that enforces one of the three sidebars to always show up. My personal desire from this is to have the seconday_side bar contain widgets that only pertain to the 'front' page. The main sidebar would be reflected on all single posts.

Share this post


Link to post
Share on other sites
Andrew

Ok, so lets do this :) Which theme and version are you using? I'll look into the sidebar.php code to see where the conditional should be added.

Share this post


Link to post
Share on other sites
michaelmiles

Whitehouse Pro v2.1.1 Thanks!

Share this post


Link to post
Share on other sites
jscurr

Any further news on this. I am having the same issues with the Station Pro theme. The widgets panel just does not respond to placing any type of widget in either of the main sidebar or secondary sidebar. All i want is for the "Categories" widget to appear under the Contact Us text box on blog front page - www.innov8consulting.com.au/news Cheers, James.

Share this post


Link to post
Share on other sites
cmunns

To show the secondary sidebar on the homepage find this code: `<?php if(get_post_meta($post->ID, 'secondary_sidebar', true)):?>` and change it to this: `<?php if(is_home() || get_post_meta($post->ID, 'secondary_sidebar', true)):?>`

The widgets panel just does not respond to placing any type of widget in either of the main sidebar or secondary sidebar.

Share this post


Link to post
Share on other sites
michaelmiles

Just to clarify, this is done in the Sidebar code, correct? (sidebar.php) That is where I found the code, and everything seems to be working fine, I'm going to do further testing throughout weekend. Thanks!

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  

×