WordPress.org

Ready to get started?Download WordPress

Forums

Content Aware Sidebars
[resolved] More than 1 manual sidebar? (7 posts)

  1. rajaman
    Member
    Posted 2 years ago #

    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?

    http://wordpress.org/extend/plugins/content-aware-sidebars/

  2. Joachim Jensen (Intox Studio)
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  3. rajaman
    Member
    Posted 2 years ago #

    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.

  4. Joachim Jensen (Intox Studio)
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  5. rajaman
    Member
    Posted 2 years ago #

    Awesome! This is exactly what I was looking for. Thanks for implementing this change so quickly! :-)

  6. Diogo15
    Member
    Posted 1 year ago #

    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' ); ?>
  7. Joachim Jensen (Intox Studio)
    Member
    Plugin Author

    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic