[Resolved] [Plugin: Content Aware Sidebars] More than 1 manual sidebar?
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:
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! 🙂
I created the sidebar “Servicios” inside the plugin(content aware sidebars), and then just display it how I normally would!… and it worked!
<?php dynamic_sidebar( 'Servicios' ); ?>
Yes, it is also possible to display the created sidebars with the standard WordPress function, however, the sidebar will then be displayed at all times where the coded is inserted – ie. content awareness will be lost.
display_ca_sidebar();should therefore be used if one wants to use the content rules for the sidebars.
For ordinary users I recommend using the Merge/Replace handles instead though.
- The topic ‘[Resolved] [Plugin: Content Aware Sidebars] More than 1 manual sidebar?’ is closed to new replies.