I want to display different dynamic sidebar on different pages, how do I access multiple sidebar on my pages.
Leave a Reply
You must be logged in to post a comment.
I want to display different dynamic sidebar on different pages, how do I access multiple sidebar on my pages.
You must be logged in to post a comment.
Place some form of hook on different pages.
Open
sidebar.php
in your themes and check for presence of hook.You should create files like
sidebar-xxxx.php
and include it, usingget_sidebar(xxxx)
in the different templates and souhld register them onthe functions.php
. If you do not wanna create these files you can register the sidebars onfunctions.php
and in the sidebar.php use:create a new sidebar
and you can link them inc with is page
is page id is 5 lets say thats the id for your home page
just check the ids of your pages and seperate them
if you want them tho show in the page childs to
just write
zou can even write a function either
For different sidebars, i thing you have to do is to create the sidebar which you want as many as you want and save those sidebars as sidebar1.php, sidebar2.php and so on.
And,just include it in the different pages where you want it to display like this:
And, like wise for other sidebars of other pages.