WordPress rel = ”prev” thiab rel = ”tom ntej no”

google webmaster ua

Ob peb xyoos dhau los, folks yuav nplua lawv cov nplooj ntawv siv cov txheej txheem hu ua nofollowCov. Hauv paus, yog tias koj sau rel = "nofollow" nyob rau hauv lub thauj tog rau nkoj (qhov txuas), qhov kev tshawb xav yog tias lub cav tshawb nrhiav yuav tsis quav ntsej qhov txuas ntawd thiab tsis quav ntsej nplooj ntawv txuas ntxiv. Nws tau siv dav siv los ntawm cov chaw zoo li Wikis thiab nyob rau hauv cov lus kom cov neeg siv kho cov kab ntawv tsis raug tsim txom thiab ua raws.

Cov kws pab tswv yim hauv Chaw Tshawb Nrhiav tau tshawb xyuas sai sai npaum li cas siv tau cov hom kev sib txuas no, ntaws lawv thoob plaws kev sib txuas ntawm nplooj ntawv kom qee qhov txuas tau hnyav dua qhov hnyav dua li lwm tus. Cov kev xyaum tau hu ua page-txua thiab thaum kawg saib rau hauv los ntawm Google.

Kuv tseem siv nofollow ntawm kuv qhov pagination links (cov ntawd yog cov kev txuas txuas ntxiv thiab yav dhau los) rau ntawm lub xaib. Txoj kev ntawd kuv nplooj ntawv (2, 3, 4, thiab lwm yam) yuav tsis suav nrog hauv kev tshawb nrhiav. Kuv tau ua qhov no los ntawm kev hloov kho kuv pom ntawm Katz Web Services page.

Lub lim tiam dhau los, Google muab cov hloov tshiab qhov twg pagination links yuav tau sau nrog rel = "tom ntej no" thiab rel = "prev" hauv cov cim npe thauj tog rau nkoj. Ua tsaug, cov haujlwm (uas yuav tsum tau ntxiv rau koj lub ntsiab cov haujlwm.php cov ntaub ntawv) yog qhov yooj yim heev los kho. Ntawm no lawv nrog cov hloov tshiab.

Customization rau Txuas Ntxiv Nplooj:

muaj nuj nqi mtb_next_posts_link ($ label = 'Next Page', $ max_page = 0) {ntiaj teb $ paged, $ wp_query; yog (! $ max_page) {$ max_page = $ wp_query-> max_num_pages; } yog (! $ paged) $ paged = 1; $ txuas ntxiv = = tob ($ paged) + 1; yog tias ((! is_single ()) && (khoob ($ paged) || $ nextpage> = $ max_page)) {echo '> a rel = "tom ntej" href = "'; next_posts ($ max_page); ncha '" npe = "Next page - Mus rau nplooj '. $ Txuas ntxiv nplooj ntawv.'"> '. preg_replace ('/ & ([^ #]) (?! [az] {1,8};) /', '& $ 1', $ daim ntawv lo). '> / a>'; .}}

Customization rau Dhau phab txuas:

muaj nuj nqi mtb_previous_posts_link ($ label = 'Page Dhau Los') {thoob ntiaj teb $ paged; yog tias ((! is_single ()) && ($ paged> 1)) {$ prevpage = tob ($ paged) - 1; ncha '> a rel = "prev" href = "'; yav dhau los_posts (); ncha '" lub npe = "Cov nplooj ntawv dhau los - Mus rau nplooj'. $ prevpage. '">'. preg_replace ('/ & ([^ #]) (?! [az] {1,8};) /', '& $ 1', $ daim ntawv lo). '> / a>'; .}}

Ntxiv cov haujlwm ntawd rau functions.php thiab tom qab ntawd siv cov haujlwm hauv koj qhov index.php thiab lwm nplooj ntawv uas cov ntawv pagination siv. Qhov ntawd yog txhua yam nws yuav siv los ua qhov tshiab no rau koj lub vev xaib WordPress lossis blog - qee yam kuv xav pom zoo! Vam tias, cov neeg tsim khoom tsim tawm ntawm WordPress yuav siv qhov kev hloov no nyob rau hauv cov ntawv tseem ceeb. Txog rau hnub tim, lawv tsis tau them nyiaj ntau rau kev tshawb fawb hauv lub tshuab tshawb nrhiav, tab sis, yog li ntawd, kuv tsis tuav kuv txoj pa.