Remove the SEO meta box from code?

#15748
  • Resolved Peter Westerlund
    Rank Math free

    I want to remove the Rank Math SEO meta box for my new post type and I want to do it from the code. I’m trying with the regular remove_meta_box() but it doesn´t work:

    function my_certificate_remove_meta_boxes()
    {
    	remove_meta_box( 'rank_math_metabox', 'my_certificate', 'normal');
    }
    add_action( 'admin_menu', 'my_certificate_remove_meta_boxes' );

    How am I supposed to do?

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math today.

    Please hook into the ‘admin_head’ action instead as shown below:

    function my_certificate_remove_meta_boxes()
    {
    	remove_meta_box( 'rank_math_metabox', 'my_certificate', 'normal');
    }
    add_action( 'admin_head', 'my_certificate_remove_meta_boxes' );

    Please ensure that ‘my_certificate’ is the correct post type slug.

    Looking forward to helping you. Thank you.

    ​​​​​​

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘Remove the SEO meta box from code?’ is closed to new replies.