Show Hero header widget on all pages
-
Hi Evan,
I want to display the hero widget on all pages of my website,
I included the code you mentioned before in my MU plugin but it hasn’t worked:
The following code you’ll want to add to your mu-plugin is as follows:
/**
* Rehook existing primer hero content
*
* @action init
*/
function rehook_primer_hero_content() {remove_action( ‘primer_hero’, ‘primer_add_hero_content’ );
/**
* Display content in the hero element.
*
* @action primer_hero
*/
add_action( ‘primer_hero’, function() {dynamic_sidebar( ‘hero’ );
} );
}
add_action( ‘init’, ‘rehook_primer_hero_content’ );All the best,
James
The page I need help with: [log in to see the link]
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Show Hero header widget on all pages’ is closed to new replies.