Faka isithonjana sasekhaya kwimenyu yokuzulazula ye-WordPress

imenyu yasekhaya

Siyayithanda i-WordPress futhi sisebenza nayo cishe nsuku zonke. Imenyu yokuzulazula ebisebenza ku-WordPress iyamangalisa - isici esihle sokuhudula bese uphonsa okulula ukusisebenzisa. Uma ingqikithi yakho ingenaso isigaba semenyu lapho ungashintsha khona amamenyu akho, udinga ukuthola unjiniyela omusha!

Ngokwengezwa komthwalo wethu we-Ajax, bengifuna ukunciphisa usayizi wesixhumanisi sasekhaya kumenyu yokuzulazula futhi ngimane ngibeke isithonjana sasekhaya. Ukungeza isithonjana akuyona inketho nge-WordPress, noma kunjalo, ngakho-ke kuye kwadingeka ukuthi sengeze ukusebenza ngefayela lengqikithi yethu yemisebenzi.php. Ngithole amazwibela ku-inthanethi we ungeza isixhumanisi sasekhaya kumenyu… Bekufanele ngiyishintshe ukuze ngisebenzise isithombe uqobo esikhundleni sesixhumanisi sombhalo.

Faka isithonjana sasekhaya ku-WordPress

i-add_filter ('wp_nav_menu_items', 'add_home_link', 10, 2); umsebenzi add_home_link ($ items, $ args) {if (is_front_page ()) $ class = 'class = "current_page_item home-icon"'; enye $ class = 'class = "home-icon"'; $ ikhayaMenuItem = ' '. $ args-> ngaphambili. ' '. $ args-> link_ngaphambi. '  '. $ args-> link_after. ' '. $ args-> ngemuva. ' '; $ izinto = $ homeMenuItem. $ izinto; buyisela izinto ze- $; }

Le khodi ingeza ikilasi esithombeni futhi ukuze ukwazi ukulungisa indawo okuyo ngephepha lakho lesitayela.

One comment

  1. 1

UCABANGANI?

Le sayithi isebenzisa i-Akismet ukunciphisa ugaxekile. Funda ukuthi idatha yakho yokuphawula isetshenziswa kanjani.