You are probably doing it too early. ss__do_sidebar is hooked in the get_header hook:
add_action( 'get_header', 'ss_sidebars_init' );
Odd, this worked in the older versions just fine. Wrapped the remove inside a function and hooked in later. Works fine now. Thank Ron!
Hi Ron,
Interesting info, thanks. I ran into the same type of problem, but altering the timing didn’t fix it. I tracked it down…. silly Woo Commerce… as soon as I disabled Genesis Connect for Woo Commerce, it started working again. I looked through its code, and found the smoking gun! So this is the command if you have Genesis Connect for Woo:
remove_action( 'genesis_sidebar', 'gencwooc_ss_do_sidebar' );
All these plugns pining for attention! 🙂 Maybe this will help someone else. I may pop all this on my blog. 🙂
Cheers,
Dave
Thanks. Same problem… I usually hook layout changes to genesis_meta and couldn’t figure out why it wasn’t working after GSS was activated.
I’ll hook in late to get_header or to genesis_before_content_sidebar_wrap
I’d like to hook into this thread. Just to help others who might have the same problem.
Didn’t get it to work, but eventually I did.
The solution was to first remove the ss_sidebar and then the genesis_do_sidebar.
This code will remove the Primary sidebar:
remove_action( 'genesis_sidebar', 'ss_do_sidebar' );
remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );
This code will not remove the Primary sidebar.
remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );
remove_action( 'genesis_sidebar', 'ss_do_sidebar' );
Marcel,
That’s interesting… change the order to make it stick! 🙂
I did end up writing a short article to handle removal of sidebars when using Woo Commerce or Genesis Simple Sidebars.
http://davidchu.net/blog/removing-genesis-sidebars/
I know there are other sidebar plugins akin to Genesis Simple Sidebars, but for any theme, not just Genesis ones, and I would guess that they also have their own “interfering” hooks.
Dave
In response to flamenco’s post. I was able to get it working with this code. I had to change the priority and location of the action hook.
add_action('get_header','os_change_genesis_sidebar', 11); //11 used as priority to match woo connect genesis integration
function os_change_genesis_sidebar() {
remove_action( 'genesis_sidebar', 'gencwooc_ss_do_sidebar' ); //special remove hook for when genesis simple sidebars & Genesis Woo Connect plugin is active
}
You’ll see the woo connect genesis plugin file for genesis-simple-sidebars.php in the sp-plugins-integration folder. First few lines deals with the integration/