I-WordPress rel = "prev" kunye ne rel = "elandelayo"

UGoogle umphathi wewebhu s

Kwiminyaka embalwa edlulileyo, abantu bebeya kuwacoca kakuhle amaphepha abo kusetyenziswa ubuchule obubiziweyo nof. Ngokusisiseko, ukuba ubhale i-rel = "nofollow" ngaphakathi kwethegi ye-anchor (ikhonkco), ithiyori yayikukuba injini yokukhangela ingayihoyi le khonkco kwaye ingalihoyi iphepha elilandelayo. Isetyenziswe kakhulu ziisayithi ezinje ngeWikis kunye nakumazwana ukuze amakhonkco ahlelwe ngumsebenzisi angaphathwa gadalala kwaye alandelwe.

Abacebisi beeNjini zokuKhangela bakhawuleze babona ukuba ziluncedo kangakanani ezi ntlobo zonxibelelwano, ukuzifefa kuwo onke amakhonkco kwiphepha ukuze ezinye amakhonkco abe nobunzima kakhulu kunabanye. Umkhuba wabizwa ukukrola iphepha kwaye yajongwa phantsi nguGoogle.

Ndisasetyenzisiwe nof Kwiikhonkco zam zobuhedeni (ezo zonxibelelwano zilandelayo kunye nezangaphambili) kwisiza. Ngale ndlela amaphepha am (2, 3, 4, njl.) Ngekhe afakwe kwiziphumo zokukhangela. Ndenze oku ngoguqulo endifumene kulo IiNkonzo zeWebhu zeKat phepha.

Kwiveki ephelileyo, uGoogle ubonelele ngohlaziyo apho Amakhonkco e-pagination anokufakwa ikhowudi ene-rel = "elandelayo" kunye ne-rel = "prev" ngaphakathi kweethegi zeankile. Ngombulelo, imisebenzi (ekufuneka yongezwe kwimixholo yemisebenzi yefayile.php) kulula ukuyihlela. Nantsi ke kunye nohlaziyo.

Ukwenza ngokwezifiso amakhonkco ePhepha elilandelayo:

sebenza mtb_next_posts_link ($ ilebula = 'Iphepha Elilandelayo', $ max_page = 0) {iphetshana lehlabathi $, $ wp_query; ukuba (! $ max_page) {$ max_page = $ wp_query-> max_num_pages; } ukuba (! Ipakishwe ngeedola) $ ipakishwe = 1; $ iphepha elilandelayo = intval ($ paged) + 1; ukuba ((! is_single ()) && (empty ($ paged) || $ nextpage> = $ max_page)) {echo '> a rel = "next" href = "'; next_posts ($ max_page); echo '" isihloko = "Iphepha elilandelayo - Yiya kwiphepha '. $ Iphepha elilandelayo.'"> '. indawo yangaphambi kwendawo ('/ & ([^ #]) (?! [az] {1,8};) /', '& $ 1', $ label). '> / a>'; }}

Ukwenza ngokwezifiso amakhonkco ePhepha langaphambili:

sebenza mtb_previous_posts_link ($ ilebhile = 'Iphepha langaphambili') ukuba ((! is_single ()) && ($ paged> 1)) {$ prevpage = intval ($ paged) - 1; echo '> a rel = "prev" href = "'; yangaphambili_post (); echo '" title = "Ikhasi langaphambili-Yiya kwiphepha'. $ iphepha eliphambili. '">'. indawo yangaphambi kwendawo ('/ & ([^ #]) (?! [az] {1,8};) /', '& $ 1', $ label). '> / a>'; }}

Yongeza loo misebenzi kwi Imisebenzi.php kwaye usebenzise umsebenzi kwi-index.php yakho nakwamanye amaphepha apho kusetyenziswa khona amakhonkco obuhedeni. Yiyo yonke into efunekayo ukuphumeza eli nqaku litsha kwindawo yakho yeWordPress okanye ibhlog- into endinokuyincoma kakhulu! Ndiyathemba ukuba abaphuhlisi beWindowsPress baya kulusebenzisa olu tshintsho ngaphakathi kwesicelo esisisiseko. Ukuza kuthi ga ngoku, khange bahoye kakhulu ekuphuculeni i-injini yokukhangela, nangona kunjalo, andibambi mphefumlo.

2 Comments

  1. 1
  2. 2

    Enkosi ngeposi enkulu. Ngelishwa, andiqondi ukuba ndingayenza njani le nto… Ke ngoku ndiza kuthandaza (kwaye ndikhangele uGoogle) ukuba kukho iplagi engenza oku kum ...

Ingaba ucinga ntoni?

Le sayithi isebenzisa i-Akismet ukunciphisa ugaxekile. Funda indlela idatha yakho yokubhaliweyo isetyenziswe ngayo.