Cov ntsiab lus MarketingSocial Media & Influencer Marketing

WordPress: Vim li cas kuv tshem tawm cov lus (Thiab kuv tshem lawv li cas)

Kuv deleted tag nrho cov lus ntawm Martech Zone hnub no thiab xiam tag nrho cov lus hauv kuv tus menyuam lub ntsiab lus. Cia peb tham txog vim li cas nws yog qhov ntse txav mus tshem tawm thiab lov tes taw cov lus ntawm koj lub vev xaib WordPress:

  1. Kev Tiv Thaiv Spam: Cov lus pom ntawm WordPress qhov chaw tsis muaj npe nrov rau kev nyiam spam. Cov lus spam no tuaj yeem cuam tshuam koj lub vev xaib thiab ua rau koj lub koob npe nrov hauv online. Kev tswj hwm thiab kev lim dej los ntawm cov lus spam no tuaj yeem siv sijhawm ntev thiab tsis muaj txiaj ntsig. Los ntawm kev tsis siv cov lus, koj tuaj yeem tshem tawm qhov teeb meem no.
  2. Duab tsis pom: Raws li kuv nkag mus rau qhov chaw rau cov teeb meem, ib qho uas txuas ntxiv mus ntxiv yog cov neeg tawm tswv yim uas tau tso tseg kev siv Gravatar, WordPress' txhais tau hais tias tso saib tus neeg tawm tswv yim qhov profile avatar lossis duab. Es tsis txhob Gravatar gracefully displaying tus qauv duab, nws yuav es tsis txhob tsim ib tug tsis pom cov ntaub ntawv, slowing lub site thiab ua yuam kev. Yuav kom kho qhov no, kuv yuav tsum tau teeb meem tus neeg tawm tswv yim thiab tshem tawm lawv… dhau sijhawm.
  3. Txhim kho qhov zoo ntawm qhov txuas: Tso cai rau cov lus pom ntawm koj lub vev xaib WordPress tuaj yeem ua rau muaj kev sib txuas sab nraud hauv cov lus hais. Qee qhov txuas no yuav yog los ntawm cov vev xaib tsis zoo lossis spammy. Cov tshuab tshawb nrhiav xav txog qhov zoo ntawm cov kev sib txuas sab nraud thaum ntsuas koj lub vev xaib. Disabling cov lus pab koj tswj hwm cov kev sib txuas ntawm koj lub xaib thiab tiv thaiv cov kev sib txuas uas cuam tshuam los ntawm kev cuam tshuam koj cov qeb duas.
  4. Sijhawm Efficiency: Kev tswj hwm thiab saib xyuas cov lus tuaj yeem cuam tshuam koj lub sijhawm thiab cov peev txheej. Lub sijhawm siv los tswj cov lus tuaj yeem siv tau zoo dua rau lwm cov haujlwm tseem ceeb ntsig txog koj qhov kev muag khoom thiab kev lag luam. Disabling lus frees lub sij hawm muaj nuj nqis los tsom rau cov ntsiab lus tsim, SEO optimization, thiab lwm yam kev muag khoom thiab kev lag luam.
  5. Hloov mus rau Social Media: Nyob rau hauv xyoo tas los no, toj roob hauv pes ntawm kev sib tham hauv online tau hloov mus deb ntawm lub vev xaib cov lus pom thiab ntau ntxiv rau kev tshaj xov xwm platforms. Cov neeg siv feem ntau yuav qhia, tawm tswv yim, thiab koom nrog koj cov ntsiab lus ntawm kev tshaj xov xwm xws li Facebook, Twitter, lossis LinkedIn. Los ntawm kev coj cov kev sib tham rau cov platforms no, koj tuaj yeem coj mus rau hauv cov zej zog loj dua, muaj zog dua thiab txhim kho koj txoj kev lag luam.

Yuav rho tawm cov lus li cas

siv MySQL thiab PHPMyAdmin, koj tuaj yeem tshem tawm tag nrho cov lus pom tam sim no nrog cov hauv qab no SQL hais kom ua:

TRUNCATE TABLE wp_commentmeta;
TRUNCATE TABLE wp_comments;

Yog tias koj lub rooj WordPress muaj qhov sib txawv ua ntej wp_, koj yuav tau hloov cov lus txib rau qhov ntawd.

Yuav Ua Li Cas Tshem Tawm Cov Lus Qhia

Cov cai no hauv koj lub ntsiab lus WordPress lossis cov ntsiab lus me me functions.php cov ntaub ntawv yog ib txheej ntawm cov dej num thiab cov ntxaij lim dej tsim los lov tes taw thiab tshem tawm ntau yam ntawm cov lus hais hauv koj lub vev xaib WordPress:

// Disable comment feeds
function disable_comment_feeds(){
    // Add default posts and comments RSS feed links to head.
    add_theme_support( 'automatic-feed-links' );

    // disable comments feed
    add_filter( 'feed_links_show_comments_feed', '__return_false' ); 
}
add_action( 'after_setup_theme', 'disable_comment_feeds' );

// Disable comments on all post types
function disable_comments_post_types_support() {
	$post_types = get_post_types();
	foreach ($post_types as $post_type) {
		if(post_type_supports($post_type, 'comments')) {
			remove_post_type_support($post_type, 'comments');
			remove_post_type_support($post_type, 'trackbacks');
		}
	}
}
add_action('admin_init', 'disable_comments_post_types_support');

// Disable comments
function disable_comments_status() {
	return false;
}
add_filter('comments_open', 'disable_comments_status', 10, 2);
add_filter('pings_open', 'disable_comments_status', 10, 2);

// Hide existing comments everywhere
function disable_comments_hide_existing_comments($comments) {
	$comments = array();
	return $comments;
}
add_filter('comments_array', 'disable_comments_hide_existing_comments', 10, 2);

// Disable comments menu in admin
function disable_comments_admin_menu() {
	remove_menu_page('edit-comments.php');
}
add_action('admin_menu', 'disable_comments_admin_menu');

// Redirect users trying to access comments page
function disable_comments_admin_menu_redirect() {
	global $pagenow;
	if ($pagenow === 'edit-comments.php') {
		wp_redirect(admin_url()); exit;
	}
}
add_action('admin_init', 'disable_comments_admin_menu_redirect');

Cia peb tawg txhua ntu:

  1. disable_comment_feeds: Qhov haujlwm no cuam tshuam cov lus qhia. Nws thawj zaug ntxiv kev txhawb nqa rau kev sib txuas pub dawb hauv koj lub ntsiab lus. Tom qab ntawd, nws siv lub feed_links_show_comments_feed lim kom rov qab los false, zoo disabling cov lus pub.
  2. disable_comments_post_types_support: Qhov haujlwm no rov ua dua los ntawm txhua hom kev tshaj tawm hauv koj qhov kev teeb tsa WordPress. Rau txhua hom kev tshaj tawm uas txhawb cov lus pom (post_type_supports($post_type, 'comments')), nws tshem tawm kev txhawb nqa rau cov lus pom thiab trackbacks. Qhov no muaj txiaj ntsig cuam tshuam cov lus pom rau txhua hom kev tshaj tawm.
  3. disable_comments_status: Cov haujlwm no lim cov xwm txheej ntawm cov lus thiab pings nyob rau pem hauv ntej-kawg kom rov qab los false, zoo kaw lus thiab pings rau tag nrho cov posts.
  4. disable_comments_hide_existing_comments: Qhov no muaj nuj nqi zais cov lus uas twb muaj lawm los ntawm kev xa rov qab ib qho array khoob thaum lub comments_array lim yog siv. Qhov no ua kom ntseeg tau tias cov lus uas twb muaj lawm yuav tsis tshwm sim hauv koj lub vev xaib.
  5. disable_comments_admin_menu: Qhov haujlwm no tshem tawm "Cov Lus Qhia" nplooj ntawv los ntawm WordPress admin ntawv qhia zaub mov. Cov neeg siv uas tsim nyog tso cai yuav tsis pom qhov kev xaiv los tswj cov lus.
  6. disable_comments_admin_menu_redirect: Yog tias tus neeg siv sim nkag mus rau nplooj ntawv cov lus ncaj qha los ntawm kev mus rau 'edit-comments.php', qhov haujlwm no hloov lawv mus rau WordPress admin dashboard siv wp_redirect(admin_url());.

Cov cai no cuam tshuam tag nrho cov lus hais hauv koj lub vev xaib WordPress. Nws tsis tsuas yog lov tes taw cov lus rau txhua hom kev tshaj tawm tab sis tseem zais cov lus uas twb muaj lawm, tshem tawm cov lus nplooj ntawv los ntawm admin ntawv qhia zaub mov, thiab xa cov neeg siv tawm ntawm nplooj ntawv. Qhov no tuaj yeem pab tau rau cov xwm txheej uas koj tsis xav siv cov lus qhia ua haujlwm thiab xav ua kom yooj yim rau koj lub vev xaib WordPress backend.

Douglas Karr

Douglas Karr yog CMO OpenINSIGHTS thiab tus founder ntawm lub Martech Zone. Douglas tau pab ntau ntau qhov kev vam meej MarTech startups, tau pab nyob rau hauv kev mob siab rau ntau tshaj $ 5 bil nyob rau hauv Martech nrhiav thiab kev nqis peev, thiab txuas ntxiv pab cov tuam txhab hauv kev siv thiab automating lawv cov kev muag khoom thiab kev lag luam cov tswv yim. Douglas yog tus paub thoob ntiaj teb kev hloov pauv digital thiab MarTech kws tshaj lij thiab hais lus. Douglas tseem yog tus sau phau ntawv Dummie phau ntawv qhia thiab phau ntawv ua lag luam.

lwm yam khoom

Rov qab mus rau sab saum toj
Close

Adblock nrhiav tau

Martech Zone muaj peev xwm muab cov ntsiab lus no rau koj yam tsis muaj nqi vim tias peb tau txais peb lub vev xaib los ntawm kev tshaj tawm cov nyiaj tau los, koom nrog kev sib txuas, thiab kev txhawb nqa. Peb yuav txaus siab yog tias koj yuav tshem koj cov ad blocker thaum koj saib peb lub xaib.