• Hi

    I am using thematic to build a child template. I want to remove the blog title and description (I know there are others ways, but I want to get this one to work…)

    the functions file in my childtheme includes:

    add_action('thematic_header', 'mbn_add_header_image',2);
    remove_action('thematic_header', 'thematic_blogtitle',3);
    remove_action('thematic_header', 'thematic_blogdescription',5);

    and the image is added but the title and description remain

    I guess i am doing something wrong –

    any help appreciates

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Just those actions alone won’t do it, you have to hook it into init.

    Try

    add_action( 'init' , 'mh_add_and_remove' , 15 );
    function mh_add_and_remove() {
            add_action('thematic_header', 'mbn_add_header_image',2);
            remove_action('thematic_header', 'thematic_blogtitle',3);
            remove_action('thematic_header', 'thematic_blogdescription',5);
    }

    See https://themeshaper.com/2009/05/25/action-hooks-wordpress-child-themes/ for more info.

    Also the remove_action() needs to have the same priority when it was added. I haven’t looked at thematic in a while.

    Thread Starter maxelcat

    (@maxelcat)

    great – thanks. The priorities were right, but I guess the order that things were happening in was wrong.

    Anyway, works now so thanks again

    @jan Dembowski:

    THANK YOU! Your suggestion to “hook it into init” was the solution I spent hours looking for.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘remove_action not working’ is closed to new replies.