Disable Link Suggestions metabox

#401479
Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello,

    Thanks for contacting us and sorry for any inconvenience that might have been caused due to that.

    You can disable the Link Suggestions box directly from the Titles & Meta settings. Please navigate to WP Dashboard > Rank Math > Titles & Meta > Post Types and disable the Link Suggestions option for the post types you want.

    Hope this helps. Let us know if you need any other assistance.

    Hello,

    I am interested in doing that programmatically because I use your plugin on every website I make and since I am using my own custom WordPress theme, I would like to have it always deactivated automatically.

    Hello,

    This filter along with any other filter that changes settings is intended to be used before the installation of Rank Math so that it can set the settings correctly in the database.

    After you have set the settings this cannot be changed unless you remove the entry that holds the Titles & Meta settings in the options table first.

    Hope this helps clarify your doubts.

    Don’t hesitate to get in touch if you have any other questions.

    I am sorry but I fail to understand your reply. The documentation states to use the code below, if you want to disable the “Link Suggestions” meta box, which is exactly what I’m trying to achieve.

    add_filter( 'rank_math/settings/titles/link_suggestions', function( $default, $post_type ) {
      return $default;
    }, 10, 2 );

    I use this code but it doesn’t seem to have any effect. Clearly there is something missing from this filter. I wrote in my first message that I’ve tried different things without success. Can you please check if your documentation is correct? Maybe there was an update or something changed?

    Nigel
    Rank Math business

    Hello,

    As an alternative, You can wrap the following snippet in a filter to edit the _link_suggestions option value directly in the database. You will also need to modify the snippet to be applied to all post types. Be sure to make a database/website backup before trying this.

    `
    $rm_options_titles = get_option(‘rank-math-options-titles’);
    $rm_options_titles[‘pt_post_link_suggestions’]=’off’; //use any post type like: ‘pt_{post type}_link_usggestions’
    var_dump($rm_options_titles);//use this line for debugging
    update_option(‘rank-math-options-titles’, $rm_options_titles);

    Hope that helps.

    Please let us know if you have questions.

    Oh I see now what you mean about settings. It’s quite weird, the documentation code was a little misleading.
    Thank you anyways!

    Hello,

    Glad that everything is clear now.

    Please feel free to reach out to us again in case you need any other assistance.

    We are here to help.

    Thank you.

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

The ticket ‘Disable Link Suggestions metabox’ is closed to new replies.