-
Hello,
Is there a way to completely remove/disable all keyword related recommendations below the snippet preview under the General tab for posts and pages?
As seen here: https://ibb.co/P68fvvyFocus keyword
Basic SEO
Additional
Title readability
Content readabilityFor most sites I work for I have no interest in those recommendations and would prefer avoiding those of using resources.
Thanks.
-
Hello,
Thank you for contacting Rank Math support today.
Please check this article that we have just released: https://rankmath.com/kb/disable-seo-content-tests/
These filters should help you disable our Content analysis selectively. To disable everything, you may need to unset everything by following this example: https://rankmath.com/kb/disable-seo-content-tests/#disable-multiple-tests
Make sure you are inserting the code at the bottom of your theme’s functions.php file.
Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.
Woah, 21 tests!
Many thanks for this but I really wonder why don’t you provide a simple “disable” option for all of them?
I mean I’m certainly not the only one to write content mainly for visitors and not for SEO and those tests are really useless and distracting in such cases.
I will certainly add this to functions, but:
– don’t you have a global snippet for ALL of them? Sure I can copy and paste one after the other but ok…
– are there any plans to implement a “disable” option in the future doing the same thing? Just to make sure I’m not wasting my time copying/pasting 21 instances for nothing…Hello,
Thanks for your reply.
We have listed the code snippets individually so that specific tests can be disabled. However, you can merge the snippets and add them to your theme’s functions.php file to disable all the tests at once.
For example:
add_filter( 'rank_math/researches/tests', function( $tests, $type ) { unset( $tests['titleHasNumber'], $tests['contentHasTOC'], $tests['contentHasShortParagraphs'], ); return $tests; }, 10, 2 );
The above code disables the test for the presence of Numbers, TOC, and short paragraphs.
There are many features inline at the moment, however, I’ll forward your suggestion to the dev. team.
Hope this helps.
Thanks.
Yes, I’ve seen that but there is no global snippet with all 21 of them.
But OK, well noted with thanks.I tried this and got a fatal error…
and this msg:
Parse error: syntax error, unexpected ')'
on line 25, which is this one:
);
In your example above is the third from bottom.
Hello,
Thanks for your reply.
It seems to be working fine on my end.
We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress logins in the designated Sensitive Data section.
It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:
https://wordpress.org/plugins/temporary-login-without-password/
You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):
https://wordpress.org/plugins/wp-security-audit-log/
We really look forward to helping you.
Hello,
We apologize for the inconvenience. I would like to add this instruction:
Please remove the comma
,
added in the last $tests[‘xxx’] item like this:add_filter( 'rank_math/researches/tests', function( $tests, $type ) { unset( $tests['titleHasNumber'], $tests['contentHasTOC'], $tests['contentHasShortParagraphs'] ); return $tests; }, 10, 2 );
If the issue persists, please share your WP login credentials as instructed by my colleague.
We are looking forward to helping you.
Before we do this, can you test with my full code below that includes all 21 tests?
It’s the one I used with the plugin Code Snippets, not directly at functions file.
add_filter( 'rank_math/researches/tests', function( $tests, $type ) { unset( $tests['titleHasNumber'], $tests['titleHasNumber'], $tests['contentHasTOC'], $tests['contentHasShortParagraphs'], $tests['contentHasAssets'], $tests['keywordInTitle'], $tests['keywordInMetaDescription'], $tests['keywordInPermalink'], $tests['keywordIn10Percent'], $tests['keywordInContent'], $tests['keywordInSubheadings'], $tests['keywordInImageAlt'], $tests['keywordDensity'], $tests['keywordNotUsed'], $tests['lengthContent'], $tests['lengthPermalink'], $tests['linksHasInternal'], $tests['linksHasExternals'], $tests['linksNotAllExternals'], $tests['titleStartWithKeyword'], $tests['titleSentiment'], $tests['titleHasPowerWords'], ); return $tests; }, 10, 2 );
Hello
Thank you for getting back to us,
Just checked your code and tested it on my local site and you seem to have disabled all the tests as shown in this screenshot: https://i.rankmath.com/H1ocab
Do let us know if this works on your end.
We are looking forward to helping you.
Thank you.Thanks Brian,
So you didn’t get any errors at your end?
I have 3 other snippets running with Code Snippet plugin and having priorities set to 10.
Should I maybe try setting the priority to 20?
Because Jeremy said above to have this one at “the bottom” of the functions file.Don’t well know how to prioritize them in order to have this one “at bottom”.
I wonder whether my issue is related to this.
What do you think?Hello,
The priority feature of Code Snippets simply determines which snippets will run before others. When using
add_filter
code, it usually doesn’t matter what this is set to.However, if you are having multiple
add_filter
priorities, then this is the case where the snippet priority will matter.Try changing the snippet priority and check if it works. If it doesn’t, try adding the filter code manually into the functions.php file.
I hope this helps. Looking forward to helping you.
Many thanks Anas, that’s good to know.
I indeed have 2 other snippets
add_filter
running with priority 10 and I include them here in Sensitive Data section.Many thanks for your help.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
In the meanwhile I just tested by adding this code directly at the end of my theme’s functions file and got exactly the same fatal error:
Parse error: syntax error, unexpected ‘)’ in /wp-content/themes/generatepress/functions.php on line 128
which is the same line with this:
);
Hello,
We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.
It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:
https://wordpress.org/plugins/temporary-login-without-password/
You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):
https://wordpress.org/plugins/wp-security-audit-log/
We really look forward to helping you.
You must be logged in to reply to this ticket.