How to Change Metabox Position from Sidebar to Below Content

#1115032
  • Dilyana
    Rank Math free

    Hello,

    I am using Rank Math SEO with the Houzez theme.

    I have noticed that the Rank Math metabox (where I enter the Title, Description, and Keywords) appears in the sidebar when I edit a Property (which is a Custom Post Type in Houzez).

    I would like to move the Rank Math metabox to the central area, below the main content editor (the “Bottom of the Post” position), as I find it more convenient for SEO editing.

    Could you please provide the specific steps to forcefully change the position of the Rank Math metabox for the property Custom Post Type and all other pages to be below the content?

    Thank you for your help.

    Best regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    We apologize for the issue you are facing with the Rank Math metabox position in the Houzez theme. Unfortunately, there isn’t a built-in option in Rank Math to change the metabox position directly through the plugin settings. However, you can achieve this by adding a custom code snippet to your theme’s functions.php file.

    Here’s a general approach to move the Rank Math metabox below the content:

    1. Access your WordPress Dashboard.
    2. Navigate to Appearance > Theme Editor.
    3. Open the functions.php file of your active theme.
    4. Add the following code snippet at the end of the file:
      add_action( 'edit_form_after_editor', function() {
         if ( 'property' === get_post_type() ) {
             remove_meta_box( 'rank_math_metabox', 'property', 'side' );
             add_meta_box( 'rank_math_metabox', __( 'Rank Math SEO', 'rank-math' ), 'rank_math_metabox_callback', 'property', 'normal', 'high' );
         }
      } );
    5. Save the changes.

    This code removes the Rank Math metabox from the sidebar and adds it below the content editor for the property custom post type. You can adjust the post type in the code if you want to apply it to other custom post types as well.

    Please ensure you have a backup of your site before making changes to the functions.php file, as incorrect modifications can lead to issues with your site.

    If you prefer a more comprehensive setup or need further assistance, we recommend considering our professional setup service, which ensures your plugin is configured correctly according to the latest SEO standards. You can find more information about this service at Rank Math Services.

    Thank you for raising this concern, and we hope this helps you adjust the metabox position as desired!

    Sources:
    Understanding Rank Math’s Meta Box Appearing in Single Posts & Pages
    [Official] Complete Rank Math Tutorial 2024 – SEO Tutorial For Beginners (Step-by-Step)! – Rank Math SEO

    This is an automated reply from Rank Math Support Bot. Your ticket has been assigned to a human agent and we will get back to you shortly.

    Dilyana
    Rank Math free

    I tried the code, but unfortunately it doesn´t change the problem.

    Hello,

    You can use this filter to transfer the metabox below instead of the right side:

    /**
     * Disable Gutenberg Sidebar Integration
     */
    add_filter( 'rank_math/gutenberg/enabled', '__return_false' );

    Here’s a guide on how to add the code to your site:
    https://rankmath.com/kb/filters-hooks-api-developer/

    Looking forward to helping you.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this ticket.