Yetsika Post Mhando neCustom Zvikamu

Wordpress

WordPress iri kuve chikuva chakakosha zvakadaro kumakambani mazhinji, asi avhareji kambani haina kana kutora mukana nechikamu chidiki chekugona. Mumwe wevatengi vedu aida kuwedzera chikamu chekushandisa kune yavo saiti asi aisada kuzviita vachishandisa mapeji kana mumablog mablog. Izvi ndizvo chaizvo zvinotsigirwa neWordPress Tsika Post Mhando for!

Mune ino kesi, isu taida kuwedzera Resource Chikamu kune imwe yemasayiti evatengi vedu. Zviri nyore kuwedzera Tsika Yemhando Post kune yako WordPress theme. Iwe unowedzera inotevera kodhi uchishandisa iro basa rejista_post_type kune ako mabasa.php peji:

// Wedzera Zviwanikwa Tsika Yemhando Tumira add_action ('init', 'gadzira_post_type'); basa gadzira_post_type () {rejista_post_type ('zviwanikwa', rondedzero ('zvinyorwa' => rondedzero ('zita' => __ ('Zvishandiso'), 'singular_name' => __ ('Resource'), 'add_new' => __ ('Wedzera Nyowani'), 'add_new_item' => __ ' => __ ('Zvese Zviwanikwa'), 'view_item' => __ ('Tarisa Zvishandiso'), 'search_items' => __ ('Tsvaga Zviwanikwa'), 'not_found' => __ ('Resource Haina Kuwanikwa'), 'not_found_in_trash' => __ ('Hapana Zvishandiso muTrash'), 'parent_item_colon' => '', 'menyu_name' => __ ('Zviwanikwa')), 'public' => chokwadi, 'has_archive' => ichokwadi 'rewrite' => array ('slug' => 'zviwanikwa'), 'zvitsigiso' => array ('zita', 'mupepeti', 'munyori', 'thumbnail', 'excerpt', 'makomendi'))) ; }

Zvakatonyanya kunetsa kuwana yaive nzira yekugadzira tsika mapoka enyu Tsika Yemhando Post. Chimwe chikonzero nei zvakaoma kuziva kuti ungaita sei izvi nekuti inonzi tsika tsika uye inoshandisa iyo register_taxonomy shanda kuti uigadzirise. Mune ino kesi, tiri kuda kuwedzera zviwanikwa senge Webinars, Whitepapers, nezvimwewo kumusoro wenyaya… saka heino imwe yekuwedzera kodhi yemabasa.php faira:

add_action ('init', 'zviwanikwa_category_init', 100); // 100 saka iyo yepositi mhando yakanyoreswa basa sosi_category_init () {register_taxonomy ('type', 'resources', array ('labels' => array ('name' => 'Resource Type', 'singular_name' => ' Rudzi rweResource ',' search_items '=>' Tsvagiridzo Yemhando ',' popular_items '=>' Mhando dzeZvinowanikwa Zvakakurumbira ',' all_items '=>' Mhando Zvese Zvekushandisa ',' edit_item '=> __ (' Ronga Rudzi rweResource ') , 'update_item' => __ ('Gadziridza Rudzi rweZvinowanikwa'), 'add_new_item' => __ ('Wedzera Rudzi Rutsva'), 'new_item_name' => __ ('New Resource Type')), 'hierarchical' => 'nhema', 'label' => 'Rudzi rweResource')); }

Tsika dzePost Post dzinokutenderawo kuti ugadzire iyo yekuchengetedza uye mamwe mapeji eako Tsika Post Mhando. Ingo teedzera iyo archive.php uye single.php mafaera. Dzorerazve makopi ne Tsika Yemhando Post muzita. Mune ino kesi, iyo ichave yekuchengetedza-zviwanikwa.php uye imwechete-zviwanikwa.php. Iye zvino unogona kugadzirisa iwo mapeji asi iwe unoshuvira kuti iro peji rezvinhu kuti riwone.

2 Comments

  1. 1

    Imwe nzira ingave yekushandisa plugin senge Nyore Tsika Zvemukati Mhando kana Mhando.

    Aya plugins zvakare anokugonesa iwe kuwedzera nyore tsika meta mabhokisi uye kugadzira yetsika peji uye kutumira matemplate.

    • 2

      Zvokwadi chaizvo @ google-d5279c8b66d25549a0ec3c8dd46a3d1a: disqus! Ini ndichave akatendeseka kuti ndinonzwa kunge akati wandei emapulagini anowedzera toni yepamusoro kumusoro kune blog ... . Ndicho chete chikonzero chandinoshanda kupinza mabasa anodikanwa mumafaira epfungwa.

Unofungei?

Nzvimbo iyi inoshandisa Akismet kuderedza spam. Dzidza kuti sei deta yako inoshandiswa.