Les fonctions Wordpress à connaître
blog.folie
25 février 2007
Publié dans Espace Experts, Wordpress
Voici les fonctions utiles Wordpress à connaître quand on veut personnaliser son blog :
- wp_list_pages
- wp_list_cats
- wp_get_archives
wp_list_pages
Cette fonction affiche une liste des pages crées.
- sort_column pour trier les pages
- si depth=3, montre le sommaire à 3 niveaux
- sort_column=menu_order&title_li=&child_of=’. $parent_id
- sort_column=menu_order&depth=1&title_li=
- depth=-1&title_li=
- title_li=&depth=1&’.$page_sort.’&’.$pages_to_exclude
- title_li=Pages
Détails, cf http://codex.wordpress.org/Template_Tags/wp_list_pages
wp_list_cats
Cette fonction affiche une liste de catégorie. Il est possible de paramètrer l’affichage avec les paramètres suivants :
- optionall - Does not display a link to all Categories
- all - Text to display for link to all Categories
- sort_column - Sorts by Category ID
- sort_order - Sorts in ascending order
- file - Displays the Categories using the index.php template
- list - Sets the Categories in an unordered list ( )
- optioncount - Does not display the count of posts within each Category
- hide_empty - Does not display links to Categories which have no posts
- use_desc_for_title - Uses the Category description as the link title
- children - Shows the children (sub-Categories) of every Category listed
- hierarchical - Displays the children Categories in a hierarchical order under its Category parent
wp_get_archives
Adresse de trackback pour cet article :
http://blog.folie.free.fr/wordpress/wp-trackback.php?p=45