Ntxiv Lub Tsev Cim Tsev rau Daim Ntawv Qhia Kev Lag Luam WordPress

ntawv qhia zaub mov noj nyob hauv tsev

Peb nyiam WordPress thiab ua haujlwm nrog nws zoo txhua hnub. Cov ntawv qhia zaub mov navigation uas tau ua haujlwm hauv WordPress yog ib qho zoo kawg - ib qhov luag zoo thiab poob qhov yooj yim uas siv. Yog tias koj lub ntsiab lus tsis muaj cov ntawv qhia zaub mov uas koj tuaj yeem hloov kho koj daim ntawv teev caij nyoog, koj yuav tsum nrhiav tus tsim tawm tshiab!

Nrog rau qhov sib ntxiv ntawm peb Ajax load, Kuv xav kom txo qhov loj me ntawm qhov txuas hauv tsev ntawm cov ntawv qhia chaw navigation thiab tsuas yog tso rau lub cim tsev. Ntxiv lub icon tsis yog qhov kev xaiv ntawm WordPress, tab sis yog, yog li peb tau ntxiv cov haujlwm los ntawm peb cov ntsiab lus functions.php. Kuv nrhiav tau snippet online rau ntxiv cov ntawv txuas tom tsev rau cov ntawv qhia zaub mov… Kuv tsuas yog yuav tsum tau hloov kho nws kom siv cov duab tiag tiag es tsis txhob txuas cov kab ntawv txuas.

Ntxiv Qhov Tsev Icon rau WordPress

add_filter ('wp_nav_menu_items', 'add_home_link', 10, 2); muaj nuj nqi add_home_link ($ khoom, $ sib cav) {yog (is_front_page ()) $ chav = 'chav = "current_page_item tsev-icon"'; lwm $ $ = = chav kawm = "tsev-icon" '; $ tsevMenuItem = ' '. $ args-> ua ntej. ' '. $ args-> link_ntawm. ' '. $ args-> link_ tom qab. ' '. $ args-> tom qab. ' '; $ khoom = $ homeMenuItem. $ khoom; rov $ khoom; }

Cov cai no ntxiv cov chav kawm rau cov duab kom zoo li uas koj tuaj yeem kho nws qhov chaw ntawm koj tus stylesheet.

ib saib

  1. 1

Yuav ua li cas koj xav hais tias?

Qhov Web site no siv Akismet los txo cov kev pabcuam. Kawm li cas koj cov ntaub ntawv tawm tswv yim tiav.