Forums

Call remove_action directly, without add_action to init (1 post)

  1. chongxam
    Member
    Posted 8 months ago #

    Howdy, everybody.

    I've created a parent theme, it's allow overriding, but when I want to overriding, in my child theme, I have to write like that:

    function my_remove(){
    remove_action('my_parent_theme_header', 'my_parent_theme_menu');
    remove_action('my_parent_theme_footer', 'my_parent_theme_footer_content');
    ...
    remove_action('anyhook', 'anyfunction');
    }
    add_action('init', 'my_remove');

    But sometimes, somebody use my theme forgot to wrap all remove_action function into a function add add it to init, because they think my theme is same as Thesis or Genesis. So, I want my child theme can remove_action directly like Thesis, Genesis. How to do that

Reply

You must log in to post.

About this Topic