Check our WordPress 101 & 201 FREE Video Tutorials here
Jump to content
alangray

[Rank Math SEO Plugin] I don't want numbers in my headlines

Recommended Posts

RankMath encourages my writers to put a number in the headline or they lose points.
I run newspapers, not blogs, so I don't want a number in every story headline and I don't want RankMath telling writers they need one.
It would be great if it was possible to turn off that item in the headline suggestions.

 

Share this post


Link to post
Share on other sites

Hello,

Thank you for contacting MyThemeShop and sorry for any inconvenience that might have been caused due to that.

Please use the following filter in your theme's functions.php file to turn that test off:

/**
 * Allow developers to modify test test or score.
 *
 * @param array  $tests Array of tests with score
 * @param string $type  Object type. Can be post, user or term.
 */
add_filter( 'rank_math/researches/tests', function( $tests, $type ) {
    if ( 'post' === $type ) {
        unset( $tests['title-readability']['titleHasNumber'] );
        $tests['title-readability']['titleStartWithKeyword']['score'] = 4;
    }
  return $tests;
}, 10, 2 );

This will move the points of that test to the title's test.

Hope that helps. If you have any further question(s), please let us know.


🏁Rank #1 on Google With our WordPress SEO Plugin

Score a 💯on PageSpeed and Dominate Search Rankings.

✏ Editing theme files? Please create a child theme to make your changes update-proof.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×