Progenitor-Theme / progenitor

MIT License
7 stars 2 forks source link

Templates for different Sidebars #22

Open danielmrey opened 6 years ago

danielmrey commented 6 years ago

Hi Simon:

How could I add a special Sidebar for an specific page?... like "Recent posts" only to Blog section?... We need templates for this right? at the moment we do not have any.

This can be done like this:

if ( is_home() ) {
    // add your special sidebar
} else {
    // add your normal sidebar
}

But that way is hardcoded no?... All pages have the same sidebars... Isn't it better go give editor options to have different sidebars for different pages using templates?... You used this way in BST no?

This is how i do it

I have various Templates

page-template (default) home-template.php blog-template.php contact-template.php special-template.php no-sidebar-template.php ...

Then I have various sidebars:

sidebar page (default) sidebar home sidebar blog contact sidebar special sidebar ...

So editors use different sidebars for different pages and even can decide which pages share same sidebars.