-
-
Save norico/50a7ab90bc9b2d1d29ce587f124b3e5b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$args = array( | |
'show_count' => false, // masque le nombre de post dans la catégorie | |
'hierarchical' => 1, // conserver la hierarchie des catégories | |
'echo' => true, // afficher | |
'selected' => true, // selection de la catégorie | |
'value_field' => 'term_taxonomy_id', // valeur passée dans le formulaire ( ici l'id de la catégorie ) | |
'show_option_all' => 'Toutes les catégories', // Permet d'ajouter un champs pour rechercher dans toutes les catégories | |
'class' => 'custom_class', // Assigns the form to the class 'postform' | |
); | |
wp_dropdown_categories($args); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment