Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function extrageCateg($taxonomy, $hide_empty = '1', $title_li = ''){
- $parametri = array(
- 'orderby' => 'name',
- 'order' => 'ASC',
- 'style' => 'list',
- 'hide_empty' => $hide_empty, // 0 pentru afisare si a categoriilor fara niciun articol, 1 pentru doar afisare categorii cu articole
- 'use_desc_for_title' => 1,
- 'child_of' => 0,
- 'title_li' => __($title_li),
- 'hierarchical' => true,
- 'number' => NULL,
- 'echo' => 1,
- 'depth' => 0,
- 'current_category' => 0,
- 'pad_counts' => 0,
- 'taxonomy' => $taxonomy,
- 'walker' => 'Walker_Category'
- );
- return wp_list_categories($parametri);
- }
- echo extrageCateg('category', '0', 'Categorii'); // al doilea si al 3lea parametru nu sunt obligatorii
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement