Help with posts page or Blog-view page and its sidebar.
-
I can’t find relevant posts that describe this problem, I’ve tried some things on my own but I’m getting nowhere really fast. I’m hoping someone can point out the right way to do this. Thank you in advance.
I’ll start with the question…
How should I go about fixing it so the posts page set in the Reading settings accepts my template and actually applies it?
Here’s my explanation and more information…
I created a “news” page and filtered its posts with a query_posts call to only get posts with the category of news. — This works great.
Then on the Reading settings in the Dashboard, I have the main page go to a Static page (Home). And the posts to go to a static page as well and I have this page created and configured as “Blog”.
I need both “Blog” and “News” page to have a different sidebar than the rest of the site, this custom sidebar makes it more “blog-centric” as opposed to the rest of the page which is more static.
So I added a sidebar the way I wanted it and I think I got it working fine, it works on the News page (its registered and I see it in the preferences so I can drop widgets etc). I added this to the template I’m using on “News” and so it shows the new sidebar as desired.
To add the custom sidebar to my “News” page I added this code
<?php include (TEMPLATEPATH . '/sidebar_blogcentric.php'); ?>
and removed other calls to the rest of the sidebars.
However the posts page “Blog” is being driven by “index.php” I know this because if I add a query_posts to the page I can filter what posts end up showing in the Blog page.
I can’t remove all the sidebars there and add the blog one like I did for “News” because then ALL the other pages also get this sidebar. No problem, I should be able to change the template being used to use the same one as the “News” page does. Or even create a new template and have it use that….
Therein lies my problem, no matter what template I choose for the static “Blog” page, it gets overridden by the “index.php” settings.
How should I go about fixing it so the posts page set in the Reading settings accepts my template and actually applies it?
- The topic ‘Help with posts page or Blog-view page and its sidebar.’ is closed to new replies.