Welcome! To use this support forum, please Login or Join Today!

   

Blog ‘Home Page’ sidebar shows only sidebar.php controlled content

{name}
Rank

Total Posts: 2

Joined 2011-09-28

PM

 

I’m really enjoying creating a new site with the Presstige theme, (behind a VPN at present) but I’ve come up against a problem I can’t seem to easily resolve, related to the a left sidebar always appearing with content driven by sidebar.php, rather than the content I want to see in the ‘Left Sidebar - Pages’ as defined by the theme widgets.

I have created a CMS type setup, with a static Home ‘page’ and a Blog ‘page’ showing posts, as outlined in your documentation.

The theme default sidebar is set to ‘left’. I placed custom content into the widgets area for ‘Left Sidebar - Pages’. On numerous pages I have created, this custom content appears without any problem. 

However, this content does NOT appear on the ‘Blog’ page - this always shows content as shown below, which is not what I have defined in my ‘Left Sidebar - Pages’ widget.

I initially tried editing these pages - index.php, page.php, home.php and home-custom.php and uncommenting as suggested in other forum threads -
// Uncomment below to override the page layout setting for this template
// Options: left, right, leftright, wide

$colstyle = “left”;

However, this still did not not affect the content of the left sidebar on this page, but I now realise that when I change the settings as recommended, with a static ‘Home’ and ‘Blog’ page, then it appears that sidebar.php comes into effect, and the content I see is triggered with the condition
<?php if ( is_home() || is_page() ) { ?>

So by manually editing the code that appears when this condition is true, I can include the sidebar content I want to see, and I can see that the file also contains important conditional code that should appear in archives and searches.

However, is there some code I can place into, or remove from this file so that, rather than having to edit this using PHP, I can just control what will appear there using widgets? I have available the plugin you recommend - Dynamic Widgets - so perhaps this could be part of the solution?

Thanks in anticipation, Casey.

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

Hi,

The Pages widget locations control widgets that are displayed on Pages.

The Posts widget locations control widgets displayed on Posts. This includes the blog home (home.php), archives (archive.php), categories (category.php), tags (tag.php), and single posts (single.php.)

This basically assumes you’re using Posts as a global blog and Pages as regular site pages. To control which individual Pages the widgets appear on, you can then use the Dynamic Widgets plugin.

{name}
Rank

Total Posts: 2

Joined 2011-09-28

PM

 

Thanks Casey, but that doesn’t help me, in that it does not change the fact that I still can’t change what appears on the left of the Blog page, other than the default which I showed above.

The ‘Blog’ container is initially set up as a normal Page (as opposed to Post), as per the instructions, and this can be controlled using the widgets without any problem, but as soon as you designate a static page setup using ‘yourblog.com/wp-admin/options-reading.php’ to have a ‘Home’ Front Page and a ‘Blog’ Posts page, then the ability to control what appears on the left or the right of that Blog Page disappears - it simply shows the content dictated by ‘sidebar.php’.

Do you see what I’m getting at here?

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

but as soon as you designate a static page setup ...  to have a ‘Home’ Front Page and a ‘Blog’ Posts page, then the ability to control what appears on the left or the right of that Blog Page disappears

Right, so once you tell WordPress that the “Blog Page” you created is your blog and not a Page, then the blog Page is no longer a Page, just a URL placeholder so your blog can be accessed from yourdomain.com/blog. Your Pages widgets do not show on your blog. The widgets on your blog “page” are defined by sidebar.php which includes the “Left Sidebar - Posts” or “Right Sidebar - Posts” widget locations. If no widgets are published, then sidebar.php inserts some default widgets so it is not just blank white space.

If I’m understanding you correctly, all you need to do is add some widgets to either the “Left Sidebar - Posts” or “Right Sidebar - Posts” widget locations. Once you do this, then the default widgets will go away.

{name}
Rank

Total Posts: 2

Joined 2011-09-28

PM

 

Got it!

I had to reset the default for all posts for the theme first, then re-edit the Blog ‘Page’ but now I can have the content that is placed in ‘Left Sidebar - Posts’ or “Right Sidebar - Posts’ appearing correctly.

Thanks man, I appreciate that!

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

No problem. Glad we got it worked out smile