Betreff: Userfunctions: @@categories lists the Categories of a post.
- <?php
- function post_notificataion_uf_perPost($post_id){
- //This is the easiest way to create array with a low possibility of errors
- $cats = wp_get_post_categories($post_id);
- foreach($cats as $cat){
- $catnames[]= get_cat_name($cat);
- }
- return $rv;
- }
- ?>
Der Autor hat eine Datei an diesen Beitrag angehängt: