Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter katielgc

    (@katielgc)

    Thank you for the quick reply! have I done something strange when signing up or is this the new URL schema by Microsoft?

    Many thanks

    katielgc

    (@katielgc)

    Hi Guys,

    I had the same issue this was conflicting with woocommerce’s shop page. I used this code to disabled on this page :

    
    add_action( 'init', 'remove_editor_init' );
    
    function remove_editor_init() {
        // If not in the admin, return.
        if ( ! is_admin() ) {
            return;
        }
    
        // Get the post ID on edit post with filter_input super global inspection.
        $current_post_id = filter_input( INPUT_GET, 'post', FILTER_SANITIZE_NUMBER_INT );
        // Get the post ID on update post with filter_input super global inspection.
        $update_post_id = filter_input( INPUT_POST, 'post_ID', FILTER_SANITIZE_NUMBER_INT );
    
        // Check to see if the post ID is set, else return.
        if ( isset( $current_post_id ) ) {
            $post_id = absint( $current_post_id );
        } else if ( isset( $update_post_id ) ) {
            $post_id = absint( $update_post_id );
        } else {
            return;
        }
    
        // Don't do anything unless there is a post_id.
        if ( isset( $post_id ) && $post_id === wc_get_page_id( 'shop' ) ) {
                remove_post_type_support( 'page', 'elementor' );
        }
    }
Viewing 2 replies - 1 through 2 (of 2 total)