Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Templates for different Sidebars #22

Open
danielmrey opened this issue Feb 20, 2018 · 0 comments
Open

Templates for different Sidebars #22

danielmrey opened this issue Feb 20, 2018 · 0 comments

Comments

@danielmrey
Copy link
Contributor

danielmrey commented Feb 20, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant