WordPress.org

Ready to get started?Download WordPress

Forums

Choose a sidebar for each Page/Post (3 posts)

  1. bcreighton
    Member
    Posted 6 years ago #

    With the advent of multiple sidebars and dynamic sidebars... has anyone come up with a way to declare, for example, 4 dynamic sidebars and let the user choose which widgetized sidebar they want shown on a particular page/post?

    ~thanks

  2. bcreighton
    Member
    Posted 6 years ago #

    Anyone?

  3. ryancp
    Member
    Posted 6 years ago #

    Hi bcreighton,

    If I understand your question correctly, you could probably set up an if else in the single.php template page that says "if the meta key $sidebar_number = 1 then include sidebar1.php", etc. for each sidebar version. Then, in your post/page, make a plugin that lets the user choose (from a drop down select list for example) which sidebar they want, and then when they save their post, insert the sidebar version as a meta key/value pair (custom field).

    I think that should accomplish what you are looking to do.

Topic Closed

This topic has been closed to new replies.

About this Topic