Skip to main content

All Questions

Tagged with
7 votes
5 answers
9k views

Different post sort order within different categories

I need to give each post a unique post order for multiple Categories (per post) it is in. I can imagine a solution using custom fields whereby for each Category there is a corresponding custom field ...
user6756's user avatar
5 votes
1 answer
3k views

Sortable admin columns, when data isn't coming from post_meta

I have a custom post type that uses a custom taxonomy. I'm imposing a limit of a single term to each post (using a custom meta box drop down on the edit post screen for the CPT). The term for the ...
Dave Romsey's user avatar
  • 17.8k
4 votes
1 answer
6k views

Custom Taxonomy Template Post List with Sort Order

I have an interesting problem I am trying to solve. Here is my situations: I have create a custom post type for "events". For each event post I require custom fields to be entered for the event start ...
NetConstructor.com's user avatar
3 votes
1 answer
929 views

Sort posts by number of matched terms

I have form where I list all terms associated with posts as check boxes, user should pick few of them, hit search and get all posts that match all chosen terms. It works great when there are posts ...
Bezbeli's user avatar
  • 35
1 vote
1 answer
29 views

Order By Post Type ThenBy Taxonomy

Assuming I have these custom post types: Product Video Article And for Product (WooCommerce Product), we have many Categories, one of which is called "Parts". I have this situation where I ...
wooncherk's user avatar
  • 111
1 vote
1 answer
336 views

Order wordpress taxonomy parent terms by their children count

I need to order parent terms by their children count: function sort_terms_by_children_count ( $terms ) { $sort_terms_by_children_count = array(); foreach($terms as $term) { $count = ...
antonimac's user avatar
1 vote
1 answer
1k views

Admin Taxonomy Terms - Orderby Term Field

I have a custom value which is being stored as term_group but in the admin panel I would like to order them by that term group. I'm able to sorta do this through this function, but there's a problem: ...
Howdy_McGee's user avatar
  • 20.7k
1 vote
1 answer
891 views

Group Post by Custom Taxonomy 2 under Custom Taxonomy 1

I have created two custom taxonomies (1. Business location and 2. Business Category) for a custom post type (Business Listing). Now I have listed all the location under Location taxonomy archive where ...
Kevin S's user avatar
  • 13
1 vote
0 answers
783 views

Custom taxonomy/category order

My products are sort by menu_order, but I would like to sort category name too. I tried a few plugins and all doesn't works. Code, which display category name and products list: <?php $...
blam4nz's user avatar
  • 13
1 vote
1 answer
1k views

How to display posts via custom taxonomy terms using checkboxes?

I would like to have a form with checkboxes. Each checkbox would be a term of my taxonomy "cities". The idea is that if a user select any of the checkboxes, it should show all posts that are NOT in ...
Mike's user avatar
  • 121
0 votes
2 answers
2k views

Sorting tags by name

I'm displaying a lit of tags when they have a description. I'd like to sort them by name instead of by post quantity. Is there a way to do this? <?php $tags = get_tags(); if ($tags) { ...
Zach Shallbetter's user avatar
0 votes
1 answer
588 views

Sort results without WP_QUERY?

I am new to coding a WP_QUERY and I tried a few things with it but it doesn't seem to work. Right now (you can see the page here: http://boomerang.mannydesigns.co/artistes/parcourir/musique/ ) I need ...
Emmanuel Henri's user avatar
0 votes
1 answer
1k views

Natural sort / ordering wp_dropdown_categories

I'm using the following code to display an archive dropdown: wp_dropdown_categories( 'taxonomy=week&hierarchical=1&orderby=name' ); However the format of the taxonomy is week-1, week-2 .....
Jona's user avatar
  • 106
0 votes
1 answer
17 views

WP_Query, Taxonomy, list of attached items to a Term, sorted

I have a Taxonomy, “Genre”. “Genre” has a Term, “advert”. I want my taxomomy template to grab all Custom Posts attached to that term, sort them by my last_name, first_name, short_title Custom Fields, ...
Mark Cyzyk's user avatar
0 votes
1 answer
121 views

Listing Cities A custom taxonmy by selection order

I have below code that lists cities in ascending order, I want to lists cities based on the order I select the cities from the frontend. It is a shortcode created by theme. Cities is a custom taxonomy ...
Emma Expat's user avatar

15 30 50 per page