Un plugin di esempio che dimostra come aggiungere facilmente nuove tassonomie al tuo Blog WordPress.
<? php/* nome plugin: yor Custom tassonomie plugin uri: http://stevenword.wpengine.com//Descrizione: aggiunge tassonomie personalizzate per il tuo Blog WordPress versione: 1.0.0 Autore: Steven parola autore URI: http://stevenword.wpengine.com/*/funzione skw_ build_taxonomies () {//Vehicles $Vehicle _args = Array (' label ' = >' veicoli ',' Hierarchical ' = > true,' query_var ' = > true,' riscrivere ' = > Array (' Slug ' = >' veicoli ')); register_taxonomy (' skw_vehicles ',' post ', $Vehicle _args);//Brands $brand _args = Array (' label ' = >' marchi ',' Hierarchical ' = > true,' query_var ' = > true,' Riscrivi ' = > Array (' Slug ' = >' marchi ')); register_taxonomy (' skw_brands ',' post ', $brand _args); } add_action (' init ',' skw_build_taxonomies ', 0);? >
Lascia un commento
Devi essere connesso per inviare un commento.