Taapirihia he Icon Kaainga ki te Tahua Whakaterenga WordPress

tahua kainga

He pai ta matou ki a WordPress, ka mahi tahi me ia i nga ra katoa. Ko te rarangi whakaterenga i kaha ki te mahi i roto i te WordPress he mea miiharo - he waahanga toia me te maturuturu pai e ngawari ana ki te whakamahi. Mena kaore he kaupapa tahua a to kaupapa hei whakarereke i o menus, me rapu he kaiwhakawhanake hou!

I tua atu o ta maatau Ajax kawenga, i hiahia ahau ki te whakaheke i te rahi o te hononga kaainga i te raarangi whakatere ka waiho noa he tohu kaainga. Ko te taapiri i te tohu ehara i te waahanga ma te WordPress, na, me taapiri atu i nga mahi ma te konae mahi.php a ta maatau kaupapa. I kitea e au he riipurangi ma runga ipurangi te taapiri i te hono kaainga ki te tahua… Me whakarereke e au kia whakamahia he ahua tuuturu kaua ki te hononga kuputuhi.

Taapirihia he tohu kaainga ki te WordPress

add_filter ('wp_nav_menu_items', 'add_home_link', 10, 2); mahi add_home_link ($ mea, $ args) {mena (is_front_page ()) $ class = 'class = "current_page_item home-icon"'; atu $ class = 'class = "home-icon"'; $ homeMenuItem = ' '. Tuhinga o mua. " . $ args-> hono_mua. '  '. $ args-> hono_uri. " . $ args-> muri iho. ' '; $ tuemi = $ homeMenuItem. $ taonga; whakahoki i nga taonga $; }

Ka taapirihia e tenei waehere tetahi akomanga ki te ahua kia taea ai e koe te whakatika i tona waahi ma to pepa taatai.

kotahi kōrero

  1. 1

He aha koutou whakaaro?

Whakamahia ai e tenei pae i te Akismet hei whakaiti i te mokowhiti. Akohia te tukatuka o to raraunga korero.