I use Wordpress as a CMS.
Options/Read with static home page called Home and blog page called News.
Sidebar.php is widgetized
On blog page, (News) I have a sidebar like this:
Pages
Home
News
Products
Categories
General
Recent posts
Post 3
Post 2
Post 1
On Home page and on Products page I would like to have a simple sidebar like this:
Home
News
Products
Home page id is 3
Products page id is 5
In page.php
Instead of:
<?php get_sidebar(); ?>
I add:
<?php if (is_page(3) || is_page(5)) {include ('sidebar-2.php'); }
else {include ('sidebar.php'); }
?>
I create sidebar-2.php like this:
<div id="left">
<ul>
<?php wp_list_pages(); ?>
</ul>
</div>
Sidebar.php begin like that:
<div id="left">
<?php if ( !function_exists('dynamic_sidebar')
|| !dynamic_sidebar() ) : ?>
other codes for Archives, categories, etc...
</div>
Sidebar of News page goes correctly but I have two problems in other pages.
Instead of sidebar needed with only:
Home
News
Products
I have:
Pages
Home
News
Products
Also, the content of the page goes in the sidebar under the page list.
Are you able to tell me what I did wrong and what can I do to fix it?
Thank You
gjfo