Reputation: 133
I would like to ask if there is any way to have customizable sidebar for every page/post. For example, the default sidebar is set for normal page or post but what if I would like to change it to use another sidebar that I have created? My idea is,
I have the idea but unfortunately I have no idea how to code it into the template. Is there any tutorial or something I should look up to?
Sorry if my question is confused, I hope you understand.
Thank you
Upvotes: 0
Views: 188
Reputation: 769
if you want to use different sidebar on different pages then you can use this code in your template file.
<?php if(is_page(YourPageID))
{
//include your sidebar here
}elseif(is_page(YourPageID)){
//include your sidebar here
}
----------
----------
?>
Upvotes: 1