How to remove the genesis_header_right action?

Community Forums Forums Design Tips and Tricks How to remove the genesis_header_right action?

This topic is: resolved

This topic contains 4 replies, has 2 voices, and was last updated by  braddalton 1 year, 2 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #56241

    Holli
    Participant
    Post count: 6

    Hi,

    I’ve searched throughout the Genesis framework code and can’t find an add_action for genesis_header_right anywhere? I know that it’s being set somewhere before this function is called in the lib/structure/header.php file because the has_action(‘genesis_header_right’) conditional is set to true. I’ve double-checked the other conditionals and the header_right sidebar is definitely unregistered. I’ve been staring at this for hours, and this is really blowing my mind. I need this has_ation conditional in header.php to be set to false. How can I make the genesis_header_right action GO AWAY?

    	if ( ( isset( $wp_registered_sidebars['header-right'] ) && is_active_sidebar( 'header-right' ) ) || has_action( 'genesis_header_right' ) ) {
    		genesis_markup( array(
    			'html5'   => '<aside %s>',
    			'xhtml'   => '<div class="widget-area header-widget-area">',
    			'context' => 'header-widget-area',
    		) );
    
    			do_action( 'genesis_header_right' );
    			add_filter( 'wp_nav_menu_args', 'genesis_header_menu_args' );
    			add_filter( 'wp_nav_menu', 'genesis_header_menu_wrap' );
    			dynamic_sidebar( 'header-right' );
    			remove_filter( 'wp_nav_menu_args', 'genesis_header_menu_args' );
    			remove_filter( 'wp_nav_menu', 'genesis_header_menu_wrap' );
    
    		genesis_markup( array(
    			'html5' => '</aside>',
    			'xhtml' => '</div>',
    		) );
    	}

    What am I missing here??? Thanks!

    #56245

    braddalton
    Participant
    Post count: 10348
    #56342

    Holli
    Participant
    Post count: 6

    Hi Brad. Thanks for trying to help. However, that doesn’t work, That’s the problem. It also doesn’t work when you unregister it with a priority of 11. Nothing works. The has_action for genesis_header_right still returns true.

    #56357

    Holli
    Participant
    Post count: 6

    Well Brad, I don’t know what was going on. Maybe something was being cached somewhere or something, but now just adding the unregister_sidebar to header_right in the functions file seems to be working. It definitely wasn’t last night. I’d like to add a lot more colorful language here, but I’ll keep this G-rated. :) Thanks again for your help Brad!

    #56358

    braddalton
    Participant
    Post count: 10348

    hahaha. Good stuff Holli.

    It’s the weird and wonderful world of WordPress!


Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘How to remove the genesis_header_right action?’ is closed to new replies.