Hot answers tagged


You could try this: // Get posts terms $terms = wp_get_post_terms( $post->ID, 'winetype', array( 'order' => 'DESC') ); $sep = ', '; foreach ( $terms as $term ) { echo $term->name; echo $sep; }


Use wp_get_post_terms() instead: <?php $names = wp_get_post_terms( $post->ID, 'winetype', array( 'orderby' => 'name', 'order' => 'DESC', 'fields' => 'names' ); echo implode(', ', $names); // to avoid trailing separator Updated by virtue of to @Pieter Goosen comment. $terms = get_the_terms( ...


If you mean the comments in comments_template() then you can use the new comments_template_query_args filter that was added with ticket #34442 in version 4.5: /** * Filters the arguments used to query comments in comments_template(). * * @since 4.5.0 * * @see WP_Comment_Query::__construct() * * @param array $comment_args { * Array of ...


In a theme with no menu locations defined - or a Wordpress install with no menus set up - the default fallback option for menus is to display the output of wp_page_menu(). By default, this will output all of your pages firstly by their order, then by their title if the orders match. This makes it simple to avoid the extra step entirely of configuring a ...

Only top voted, non community-wiki answers of a minimum length are eligible