I'm building a WP site that needs to have the ability for unique widgets on a per-section basis. I've built out the page structure of the site, then built the sidebar structure of the site. It goes like this...
Services (section - uses Services sidebar) Service Name (page - uses Services sidebar) Service Name (page - uses Services sidebar) Industries (section - uses Industries sidebar) Industry (page - uses Industries sidebar) Industry (page - uses Industries sidebar)
While on a Service Name post creation page, I'd like to have a Select dropdown in a meta box on the side that allows for the selection of a registered sidebar. For instance, while creating a new Service Name page, I'd like to select the Services sidebar as the desired sidebar for that page. Then, I could reference that object in my sidebar.php file.
The reason I want this setup is because I have nothing to tie to that says "if this page falls under the Services parent page, I'd like this sidebar to show up every time." I could use conditionals and tie to page name, page ID, slug, etc... but this isn't flexible and doesn't fit the CMS request. What if the client changes Services to Our Services? what if they recreate the Services page and it gets a new ID? I can't restrict my client to these conventions.
I can't rely on Widget Logic plugin or anything like it because the client would have no idea how to use it; it clearly wasn't built for the technologically-challenged crowd.
Any help or advice with this would be super-helpful. And if my logic in how I'm building this isn't right, please feel free to tell me I'm a big dummy and explain how this would be done best.