Tag Info

Hot answers tagged

2

You can try the MySQL function SUBSTRING_INDEX() within the get_terms_orderby filter: /** * Order by the last word in the term name * @link http://wordpress.stackexchange.com/a/195039/26350 */ add_filter( 'get_terms_orderby', function( $orderby, $args ) { if( isset( $args['orderby'] ) && 'wpse_last_word' === $args['orderby'] ) ...


1

Your best option will be to get an array of term ids by using get_terms which belongs to the authors taxonomy and then using that as your array of terms in your tax_query The following requires PHP5.4+ $term_ids = get_terms( 'authors', ['fields' => 'ids'] ); // Only get term ids $args = [ 'tax_query' => [ [ 'taxonomy' => ...


1

To get a list of categories when you visit yoursite.com/topics or even the default yoursite.com/categories (doesn't matter; it's not a link structure related issue) you have to have a template for this. It's like a sitemap. If you want to show a sitemap on your front-end, you'll have to have a sitemap template. In this case, it's a category archive what ...


1

The simple and quickest solution is showing categories list by using sitemap plugin with short-code. For example this plugin WP Sitemap Page. Install it and place shortcode on page. Second option is create page template for category list. Using wp_list_categories() Thanks



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