• Resolved togur

    (@togur)


    I have a problem with using plugin in Genesis framework.

    I want to replace primary menu before header. I used code for removing primary navigation:

    remove_action( ‘genesis_after_header’, ‘genesis_do_nav’);

    But nothing happens. Everything is OK when i placed code directly into function.php

    I have tried to specify priority

    remove_action( ‘genesis_after_header’, ‘genesis_do_nav’, 10);

    No difference.

    Thanks for any advice.

    https://www.ads-software.com/plugins/code-snippets/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    Snippets run before functions.php, so perhaps the function is running to early. Try wrapping the remove_action call in a function hooked to after_setup_theme:

    function my_genesis_move_nav() {
        remove_action( 'genesis_after_header', 'genesis_do_nav' );
        add_action( 'genesis_before_header', 'genesis_do_nav' );
    }
    
    add_action( 'after_setup_theme', 'my_genesis_move_nav' );
    Thread Starter togur

    (@togur)

    It works! Thanks for excellent support!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problem in Genesis framework’ is closed to new replies.