در برخی مواقع ممکن است کاربر نخواهید برخی بخش ها یا المان ها در تست افزونه رنک مث آنالییز و رتبه بندی شود. مثلا تمایل نداشته باشد که محتوا توسط هوش مصنوعی آنالییز شود و یا دوست نداشته باشد که دارا بودن عکس در محتوا به عنوان یک امتیاز تلقی شود پس برای غیر فعال کردن برخی تست های Rank Math ما راه کار بسیار کاربردی و تست شده ای را معرفی میکنیم.

غیر فعال کردن برخی تست های Rank Math

برای غیر فعال کردن برخی تست های Rank Math ابتدا وارد هاست شده و پوشه قالب Themes را باز کنید. فایل Functions.php را باز کنید. در واقع کدهای زیر هر کدام برای غیر فعال کردن یکی از تست ها و نمایش ندادن نمره و امتیاز آن تست می باشد. کافیست برای غیر فعال کردن برخی تست های Rank Math کد مربوط را در فایل Funections.php در انتهای کدها وارد نمایید

کدهای غیر فعال کردن برخی تست های Rank Math

تست عنوان

/**
 * Filter to disable Number in Title test
 */
add_filter('rank_math/researches/tests', function ($tests, $type) {
	unset($tests['titleHasNumber']);
	return $tests;
}, 10, 2 );

تست محتوا

/**
 * Filter to disable Table of Content test
 */
add_filter('rank_math/researches/tests', function ($tests, $type) {
	unset($tests['contentHasTOC']);
	return $tests;
}, 10, 2 );

تست پاراگراف کوتاه

/**
 * Filter to disable Short Paragraph test
 */
add_filter('rank_math/researches/tests', function ($tests, $type) {
	unset($tests['contentHasShortParagraphs']);
	return $tests;
}, 10, 2 );

تست دارایی

/**
 * Filter to disable Assets test
 */
add_filter('rank_math/researches/tests', function ($tests, $type) {
	unset($tests['contentHasAssets']);
	return $tests;
}, 10, 2 );

کلمه کلیدی اصلی

/**
 * Filter to disable Keyword in Title test
 */
add_filter('rank_math/researches/tests', function ($tests, $type) {
	unset($tests['keywordInTitle']);
	return $tests;
}, 10, 2 );

کلمه کلیدی اصلی در توضیحات متا

/**
 * Filter to disable Keyword in Meta Description test
 */
add_filter('rank_math/researches/tests', function ($tests, $type) {
	unset($tests['keywordInMetaDescription']);
	return $tests;
}, 10, 2 );

کلمه کلیدی اصلی در URL

/**
 * Filter to disable Keyword in Permalink test
 */
add_filter('rank_math/researches/tests', function ($tests, $type) {
	unset($tests['keywordInPermalink']);
	return $tests;
}, 10, 2 );

کلمه کلیدی اصلی در 10% اول محتوا

/**
 * Filter to disable Keyword in First ten percent of Content test
 */
add_filter('rank_math/researches/tests', function ($tests, $type) {
	unset($tests['keywordIn10Percent']);
	return $tests;
}, 10, 2 );

کلمه کلیدی در محتوا

/**
 * Filter to disable Keyword in Content test
 */
add_filter('rank_math/researches/tests', function ($tests, $type) {
	unset($tests['keywordInContent']);
	return $tests;
}, 10, 2 );

کلید واژه در عنوان فرعی

/**
 * Filter to disable Keyword in Subheadings test
 */
add_filter('rank_math/researches/tests', function ($tests, $type) {
	unset($tests['keywordInSubheadings']);
	return $tests;
}, 10, 2 );

کلمه کلیدی اصلی در ویژگی alt

/**
 * Filter to disable Keyword in Image Alt test
 */
add_filter('rank_math/researches/tests', function ($tests, $type) {
	unset($tests['keywordInImageAlt']);
	return $tests;
}, 10, 2 );

چگالی کلمه کلیدی

/**
 * Filter to disable Keyword Density test
 */
add_filter('rank_math/researches/tests', function ($tests, $type) {
	unset($tests['keywordDensity']);
	return $tests;
}, 10, 2 );

کلمه کلیدی استفاده نشده

/**
 * Filter to disable Keyword not used before test
 */
add_filter('rank_math/researches/tests', function ($tests, $type) {
	unset($tests['keywordNotUsed']);
	return $tests;
}, 10, 2 );

طول محتوا

/**
 * Filter to disable length of the content test
 */
add_filter('rank_math/researches/tests', function ($tests, $type) {
	unset($tests['lengthContent']);
	return $tests;
}, 10, 2 );

طول پیوند (لینک)

/**
 * Filter to disable length of the permalink test
 */
add_filter('rank_math/researches/tests', function ($tests, $type) {
	unset($tests['lengthPermalink']);
	return $tests;
}, 10, 2 );

لینک داخلی

/**
 * Filter to disable Internal Links test
 */
add_filter('rank_math/researches/tests', function ($tests, $type) {
	unset($tests['linksHasInternal']);
	return $tests;
}, 10, 2 );

لینک های خارجی

/**
 * Filter to disable External Links test
 */
add_filter('rank_math/researches/tests', function ($tests, $type) {
	unset($tests['linksHasExternals']);
	return $tests;
}, 10, 2 );

کلمه کلیدی در شروع

/**
 * Filter to disable Title starts with Keyword test
 */
add_filter('rank_math/researches/tests', function ($tests, $type) {
	unset($tests['titleStartWithKeyword']);
	return $tests;
}, 10, 2 );

احساسات عنوان

/**
 * Filter to disable Title Sentiment test
 */
add_filter('rank_math/researches/tests', function ($tests, $type) {
	unset($tests['titleSentiment']);
	return $tests;
}, 10, 2 );

هوش مصنوعی محتوا

/**
 * Filter to disable Content AI test.
 */
add_filter('rank_math/researches/tests', function ($tests, $type) {
	unset($tests['hasContentAI']);
	return $tests;
}, 10, 2);

منبع مطلب آموزش غیر فعال کردن برخی تست های Rank Math

https://rankmath.com/kb/disable-seo-content-tests

دیدگاهتان را بنویسید

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *