Removing entirely the Focus Keyword and the tests

#672762
Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello,

    I’m sorry to hear about the trouble you’re facing with removing the focus keyword and the associated tests. I understand that you’ve tried several steps to disable the content analysis and remove the focus keyword, but it seems like the changes are not reflecting as expected.

    Based on the steps you’ve taken, it appears that you’ve followed the correct process to disable the content tests using the filters provided in our documentation. However, it seems that the changes are not taking effect as intended.

    I’d like to assure you that we can definitely help you resolve this issue. To further investigate and assist you effectively, I kindly request that you assign this ticket to our support team by clicking on the “Assign to Support” button below. Once you do that, one of our support agents will take over and provide you with a solution to remove the focus keyword and associated tests without resorting to CSS workarounds.

    Thank you for your patience, and we look forward to resolving this for you.

    Sources:
    How to Disable Rank Math SEO Content Tests » Rank Math

    Hello,

    Thank you for your query, and we are so sorry about the trouble this must have caused.

    First step : Do not activate Content analysis
    https://gyazo.com/c28065a0a745a12e65ab0430a51e1d30
    The box appears on post edit.
    https://gyazo.com/0b0a6f055e94e1bc89e22e228408c222

    As per your screenshots above, this module is for the purpose of enabling/diabling SEO Analyzer and not Content Analysis.

    screenshot

    This is the reason why Content Analysis remains appearing even when you disable SEO Analyzer.

    However you can check that if you disable SEO Analyzer from there the SEO Analyzer option disappears from the Rank Math Menu.

    screenshot

    Second step : use the filters as defined here https://rankmath.com/kb/disable-seo-content-tests/
    Nothing changes

    Please make sure you are using all the codes combined like the given example here to disable all the tests.

    An example of the combined code is given here “Disable Multiple Tests” :
    https://rankmath.com/kb/disable-seo-content-tests/#multiple-tests

    In the same way I have merged the code to disable all the 24 tests as given in that code reference.

    Please use the below code :

    /**
     * Filter to disable multiple SEO Contest tests
     */
    add_filter('rank_math/researches/tests', function ($tests, $type) {
    	unset(
    		$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'],
    		$tests['hasContentAI'],
    		$tests['isReviewEnabled'],
    		$tests['hasProductSchema']		
    	);
    	return $tests;
    }, 10, 2);

    Here’s how you can add filter/hook to your WordPress site:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    However please understand that using this code to disable the test does not hide the Content Analysis section. It just displays green checks “All Good” for the tests like below in the post editor page.

    screenshot

    Third step : activate the content analysis
    The tests looked like they are “ok”, but I still have the Focus keyword and I do not want any of this information
    https://gyazo.com/a29e3954b512957ac4eb78e694a5bc40

    Once again it has nothing to do with SEO Analyzer Module as this is Part of Content Analysis. Like I said in the above a lines that it will show “All Good” because of the code but still remain to show the Content Analysis Section and not hide it completely.

    Fourth step : ask your support
    and use the hook they gave me :
    add_filter(‘rank_math/snippet/rich_snippet_article_entity’, function( $entity ) {
    unset( $entity[‘keywords’] );
    return $entity;
    });

    Nothing changes

    The hook is to unset and remove Schema Data from Posts so it will not have any effect on the Content Analysis section of the Post Editor Page.

    Fifth step : try through the role manager
    Unchecking “page analysis” hides totally the tests, but I still have the focus keyword

    https://gyazo.com/67c4fa97d05b21c9330acb0e0e60f32f

    Yes its true that if you disable the “On-Page Analysis from Role Manager it will hide the tests but the remaining section will remain there. This is the intended behaviour of that Role Manager feature.

    screenshot

    So is there anyway to remove it without using bad css workarounds (like “hidden”) ?

    (I want to get rid of the Focus Keyword, the suggestion to use the pro version and the corner content checkbox)

    Here you go, please add the below php filter/hook code to your site:

    function hide_specific_divs_in_editor() {
        $screen = get_current_screen();
        if ($screen->base == 'post') { // This targets the post editor. Change to 'page' for the page editor.
            echo '<style>
                .rank-math-focus-keyword {
                    display: none !important;
                }
            </style>';
        }
    }
    add_action('admin_head', 'hide_specific_divs_in_editor');

    Here’s how you can add filter/hook to your WordPress site:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    The above code will do the needful and it will look like this :

    screenshot

    We hope that helps, and please don’t hesitate to get in touch if you have any other questions.

    Thank you.

    Thank you.

    In modules, i do not see a “content analysis”, just “content ai” and “seo analyzer” and they are not activated. So can you show me with a screenshot where I could deactivate it ?

    Anyway, from your answer, I take there is no other way than hiding the box through CSS ?

    (and YES i did also tried the combined method for deactivating tests, and it produced the same result).

    Hello,

    In modules, i do not see a “content analysis”, just “content ai” and “seo analyzer” and they are not activated. So can you show me with a screenshot where I could deactivate it ?

    Content Analysis is not a module. We call the part that you want hide as the Content Analysis section. The section in the right sidebar of posts/pages editor that shows the green checks and the red crosses for the tests based on the content is called the Content Analysis section.

    screenshot

    line

    Anyway, from your answer, I take there is no other way than hiding the box through CSS ?

    We shared with you the filer code that will help you do thate here.

    line

    (and YES i did also tried the combined method for deactivating tests, and it produced the same result).

    Could you please confirm if you were able to get the exact same resuts as the screenshot provided earlier here.

    We really look forward to helping you.

    Thank you.

    We shared with you the filer code that will help you do thate here.

    I saw that, thanks, I’m able to do it myself.

    But I would prefer NOT, because hiding with css is an “ugly trick” instead of purely deactivating.
    Thank you anyway.

    Hello,

    We are glad we could address your concern.

    Please feel free to create a new forum topic if you do have another question in the future.

    It will be our pleasure to assist you again.

    Thank you.

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

The ticket ‘Removing entirely the Focus Keyword and the tests’ is closed to new replies.