• function hide_editor_page(){
    global $_wp_post_type_features;
    $post_type= “page”;
    $feature = “editor”;
    if(isset($_wp_post_type_features[$post_type][$feature])):
    unset($_wp_post_type_features[$post_type][$feature]);
    endif;
    }

    function test1(){
    global $template;
    global $_wp_post_type_features;
    $post_type= “page”;
    $feature = “editor”;
    if(basename($template) == “contact.php”):
    remove_action(“init”,”hide_editor_page”,10);
    endif;
    }
    add_action(‘init’,’test1′,5);

    Can anyone suggest The hide_editor_page is working fine but when try to remove the same using test1 the basename($template) condition it’s not working. Without the basename($template) condition remove_action is working.

  • The topic ‘Unable to remove an action for a page template in wordpress’ is closed to new replies.