Tag Info

New answers tagged

0

wp_list_categories() is an odd function in that it's uniquely useful in certain situations with custom taxonomies but it was originally written before they even existed. (It was introduced in 2.1 and the taxonomy attribute was added in 3.0 (source).) What you're seeing is a known issue with an associated bug report (filed two years ago, last activity four ...


0

Did you had a look at the Display Categories Assigned to a Post example in wp_list_categories in the Codex. This should give you a very good idea on how to modify your own code. This is just my simplistic way to achieve what you want. Feel free to modify as needed <?php $taxonomy = 'category'; $separator = ', '; if ( !is_wp_error( $post_terms ) ) { ...


0

You can use get_the_category(); to display your category in menu <?php $categories = get_the_category(); $separator = ' '; $output = ''; if($categories){ foreach($categories as $category) { $output .= '<a " href="'.get_category_link( $category->term_id ).'" title="' . esc_attr( sprintf( __( "View all posts in %s" ), ...



Top 50 recent answers are included