Move Top Bar Outside The Header Worpress

/* The top bar is by default hooked into the header so when the header is disabled
 * so is the top bar. However, you can move the Top Bar into a different hook to prevent that
 * @deprecated Please update your theme because this is now the default structure in the latest version
 * no need to add any code to your site.
function my_move_top_bar() {

	// Remove from the header hook
    remove_action( 'wpex_hook_header_before', 'wpex_top_bar' );

    // Re-add with low priority to make sure it comes before the header
	add_action( 'wpex_hook_wrap_top', 'wpex_top_bar', 5 );

add_action( 'init', 'my_move_top_bar', 20 );

Leave a Reply

Your email address will not be published. Required fields are marked *