آموزش طراحی سایت بازی

بهترین سایت آموزش طراحی سایت مخصوص بازی به همراه آموزش سئو سایت بازی در سایت سئوتم

آموزش طراحی سایت بازی

بهترین سایت آموزش طراحی سایت مخصوص بازی به همراه آموزش سئو سایت بازی در سایت سئوتم

مخفی کردن افزونه yoast seo از دید رقیبان وبسایت وردپرسی


غیرفعال کردن تبلیغات و کدهای اضافی افزونه yoast seo

با استفاده از این کد دیگه کاربرای سایتتون نمیتونن بفهمن که شما از کدوم افزونه سئو استفاده میکنید.


با قرار دادن کدهای زیر در فایل Functions فانکشن قالب وردپرس تبلیغات اضافی افزونه یواست سئو را غیرفعال نمایید.

 سئو سایت

 

/* **************************************************** BEGIN YOAST BLOCK ***************************************************************************** */
/* Using Yoast SEO Plugin? Then use these functions to remove annoying popups, divs and stupid SEO score */
function rankya_yoast_edits() {
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
if ( is_plugin_active( 'wordpress-seo/wp-seo.php' ) || is_plugin_active( 'wordpress-seo-premium/wp-seo-premium.php' ) ) {
function yoast_remove_blocks_with_css() {
if ( is_user_logged_in() && current_user_can( 'manage_options' ) || is_admin()) { ?>
<style type="text/css">
[class*="is-dismissible"], #wpseo-dismiss-about, #wpseo-dismiss-recalculate, li#wp-admin-bar-wpseo-menu, #sidebar-container #sidebar, .wpseotab.active > p:nth-child(6), .wpseotab.active > p:nth-child(7), #wpseo-dismiss-gsc, #yst_opengraph_image_warning, #metamessage.error, #blocking_files, [id*="metadesc_found"][class*="wrong"], .wpseo-tab-video-container, #wpseo-dashboard-overview, #i18n_promo_box, #wpseo-score-readability.column-wpseo-score-readability, .yoast-issue-counter,#yoast_internal_linking, div.yoast_premium_upsell_admin_block, #wpseo-debug-info,[class*="container__alert"],[class*="container__warning"], #wpseofocuskeyword {
display:none !important
}
.postbox {
border:1px solid #e5e5e5 !important
}
</style>
<?php } //end if user logged in
} //end yoast styles removal
add_action( 'admin_head', 'yoast_remove_blocks_with_css' ); // hook in to action admin_head to place this CSS
function yoast_seo_dashboard_overview_widget() {
remove_meta_box( 'wpseo-dashboard-overview', 'dashboard', 'side' );
}
add_action( 'wp_dashboard_setup', 'yoast_seo_dashboard_overview_widget' );
function yoast_ignore_tour() {
update_user_meta( get_current_user_id(), 'yoast_ignore_tour', true );
}
add_action( 'admin_init', 'yoast_ignore_tour', 999 );
function wpseo_disable_rel_next_home( $link ) {
if (is_home() || is_front_page()) {
return false;
}
}
add_filter( 'wpseo_next_rel_link', 'wpseo_disable_rel_next_home' );
function remove_stupid_adminbar_menu_for_yoast() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('wpseo-menu');
}
add_action( 'wp_before_admin_bar_render', 'remove_stupid_adminbar_menu_for_yoast' );
/*
function remove_json_ld_output( $data ) {
$data = array();
return $data;
}
add_filter('wpseo_json_ld_output', 'remove_json_ld_output', 10, 1);
add_filter( 'wpseo_json_ld_output', '__return_empty_array' );
add_filter( 'disable_wpseo_json_ld_search', '__return_true' );
*/
function rankya_columns_filter( $columns ) {
unset($columns['wpseo-score']);
unset($columns['wpseo-focuskw']);
return $columns;
}
add_filter( 'manage_edit-page_columns', 'rankya_columns_filter',10, 1 );
add_filter( 'manage_edit-post_columns', 'rankya_columns_filter',10, 1 );
//remove the comments
add_action('get_header', 'start_ob');
add_action('wp_head', 'end_ob', 999);
function start_ob() {
ob_start('remove_yoast');
}
function end_ob() {
ob_end_flush();
}
function remove_yoast($output) {
if (defined('WPSEO_VERSION')) {
$targets = array(
'<!-- This site is optimized with the Yoast SEO plugin v'.WPSEO_VERSION.' - https://yoast.com/wordpress/plugins/seo/ -->',
'<!-- This site is optimized with the Yoast SEO plugin v'.WPSEO_VERSION.' - https://yoa.st/1yg?utm_content='.WPSEO_VERSION.' -->',
'<!-- This site is optimized with the Yoast SEO Premium plugin v'.WPSEO_VERSION.' - https://yoast.com/wordpress/plugins/seo/ -->',
'<!-- This site is optimized with the Yoast SEO Premium plugin v'.WPSEO_VERSION.' - https://yoa.st/1yg?utm_content='.WPSEO_VERSION.' -->',
'<!-- / Yoast SEO plugin. -->',
'<!-- / Yoast SEO Premium plugin. -->',
'<meta name="robots" content="noodp"/>' //, // added this below but for RankYa Theme removed from header.php file
//'<link rel="profile" href="http://gmpg.org/xfn/11">' //because you do NOT need this
);
$output = str_ireplace($targets, '', $output);
$output = trim($output);
$output = preg_replace('/^[ \t]*[\r\n]+/m', '', $output);
}
return $output;
}
function rankya_remove_yoast_notice() {
if ( is_plugin_active( 'wordpress-seo/wp-seo.php' ) ) {
if ( !class_exists( 'Yoast_Notification_Center' ) ) {
require_once( WP_PLUGIN_DIR . '/wordpress-seo/admin/class-yoast-notification-center.php' );
}
remove_action( 'all_admin_notices', array( Yoast_Notification_Center::get(), 'display_notifications' ) );
}
/*
just stop using the stupid Yoast redirections altogether
//Yoast SEO Disable Automatic Redirects for Posts And Pages
add_filter('wpseo_premium_post_redirect_slug_change', '__return_true' );
//Yoast SEO Disable Automatic Redirects for Taxonomies (Category, Tags, Etc)
add_filter('wpseo_premium_term_redirect_slug_change', '__return_true' );
// Yoast SEO Disable Redirect Notifications for Posts or Pages: Moved to Trash
add_filter('wpseo_enable_notification_post_trash', '__return_false');
//Yoast SEO Disable Redirect Notifications for Posts and Pages: Change URL
add_filter('wpseo_enable_notification_post_slug_change', '__return_false');
// Yoast SEO Disable Redirect Notifications for Taxonomies: Moved to Trash
add_filter('wpseo_enable_notification_term_delete','__return_false');
// Yoast SEO Disable Redirect Notifications for Taxonomies: Change URL
add_filter('wpseo_enable_notification_term_slug_change','__return_false');*/
} //end rankya_remove_yoast_notice
add_action( 'admin_init', 'rankya_remove_yoast_notice' );
} //end if ( is_plugin_active( 'wordpress-seo/wp-seo.php' ) or premium check)
} //end function rankya_yoast_edits()
// UPON ACTIVATION DO
add_action( 'init', 'rankya_yoast_edits' );
/*end rankya_yoast_edits*/

/* **************************************************** END YOAST BLOCK ***************************************************************************** */

نظرات 0 + ارسال نظر
امکان ثبت نظر جدید برای این مطلب وجود ندارد.