I am using Storefront (Woocommerce theme).

I created a child theme.

I want to move the secondary navigation below the main menu.

I added this to functions.php to the child theme but it doesn't work.

Any idea ?



remove_action( 'storefront_header', 'storefront_secondary_navigation', 30 );
add_action( 'storefront_header', 'storefront_secondary_navigation', 52 );


closed as off-topic by Mark Kaplun, Jack Johansson, cjbj, Dave Romsey, kraftner Aug 1 '17 at 10:54

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • This could help stackoverflow.com/questions/37745795/… – Arsalan Mithani Jul 25 '17 at 15:11
  • Sorry, but this site is not a replacement for the support channels of plugins and themes. This question should be referred to the author of the theme. The only valid way to ask "how to modify a plugin/theme" kind of questions is by including the relevant code in the question – Mark Kaplun Jul 25 '17 at 15:24

Instead of adding and removing the hooks like this. You should do the work on some action/hook. which gets fire before these hooks.

so you can call it in this way

add_action( 'init' , 'sf_change_header_position' , 10 );
function sf_change_header_position() {
   remove_action( 'storefront_header', 'storefront_secondary_navigation', 30 );
   add_action( 'storefront_header', 'storefront_secondary_navigation', 52 );

Not the answer you're looking for? Browse other questions tagged or ask your own question.