I love the template code <?php display_ca_sidebar(); ?> to insert a sidebar manually. Is it possible to insert two or more different sidebars manually?
I love the template code <?php display_ca_sidebar(); ?> to insert a sidebar manually. Is it possible to insert two or more different sidebars manually?
Thanks for your feedback.
If you have more than one content aware sidebar to be handled manually and their "content rules" overlap at certain pages of your site, display_ca_sidebar(); will merge the sidebars at these pages, so that they both will be shown by this function.
However, right now it is not possible to use the function to show single content aware sidebars at different spots. It will certainly be supported at some point though.
I'll see if I can include it in the next release, but I can't promise anything.
Thanks for getting back to me. If you manage to include this function in the next release, that would be great. In any case I look forward to it at some point in the future. All the best and kind regards.
It is now possible to pass id's to the function so that only the sidebars with these id's are shown. They can be written as a string and separated by commas or as an array. E.g.:
display_ca_sidebar(array("include" => array(1,2,3)));
display_ca_sidebar(array("include" => "1,2,3"));
And as the function accepts URL-style strings, it can be shortened to:
display_ca_sidebar("include=1,2,3");
An exclude argument will be implemented eventually as well.
Awesome! This is exactly what I was looking for. Thanks for implementing this change so quickly! :-)
You must log in to post.