Hello,
I'm building a plugin that needs to determine whether the page being viewed is a single page (as determined by is_single()). If is_single evaluates to true, then I need to use my custom sidebar. If false, then the default sidebar. The is_single part is easy enough... but I am at wit's end trying to figure out how to change the get_sidebar() to get_sidebar('custom-sidebar') without modifying the theme files.
I don't want to hack the theme files in any way.
I think Kaiser has it fairly close over at stack exchange (http://wordpress.stackexchange.com/questions/64492/change-which-sidebar-get-sidebar-gets-from-functions-php), but I can't get that to work.
I am reaching out here as a final effort at finding an answer- not a first. I'm starting to think that what I want to do can't be done, but it seems like with all of WP's thousands of hooks, there should be some hook or filter for something like this.
Thanks.