The tag has no wiki summary.

learn more… | top users | synonyms (1)

0
votes
0answers
24 views

How to sort a WP_Query array by post_name after an array_merge();

I have an WP_Query array made up from two WP_Query() objects merged together as follows: $query1 = new WP_Query($args1); $query2 = new WP_Query($args2); $wp_query = new WP_Query(); ...
0
votes
1answer
379 views

Sort All Posts by Category Name in the Admin Panel?

I'm working on a pretty complicated site where everything is managed by category type including automatic spinner image submission, etc.. Unfortunately, its doggone difficult to manage things when the ...
0
votes
1answer
103 views

Ordering posts by custom taxonomy in admin area

EDIT @kaiser - this question is slightly different to the answer you posted in that I am talking about sorting by clicking the column title rather than adding a dropdown to filter by taxonomy term ...
1
vote
2answers
2k views

Group Posts by First Letter of Title

I am working on a website that is using posts as a way to manage glossary articles similar to the example website below. I would like to find a way to display articles alphabetically and grouped by a ...
0
votes
0answers
47 views

Ajax URL not saving data

I have a submenu admin section under my custom post type which lists the custom posts by category. I have applied jQuery sortable and it all works fine except for the actual saving to the postmeta in ...
0
votes
1answer
583 views

Sorting dynamic table content with jQuery

I've been trying to use numerous jQuery plugins for tabling sorting in WordPress and have had absolutely no luck. Can anyone make a suggestion for a plugin that sorts tables of dynamic content? I'm ...
-1
votes
1answer
31 views

Can't sort custom column on user.php by number / meta_value_num?

Everything else works fine but it's still not sorting by number. Would just like to know what I'm doing wrong here Here's the code function add_user_columns( $defaults ) { ...
0
votes
2answers
523 views

Make custom post type column sortable

My site has two custom types: Auction and Lot. Lots are connected to an Auction via the post_parent field. I added an Auction column to the Lots list in the admin area. function ...
0
votes
0answers
17 views

Sorting with custom field and 'comment_count' - orderby

How can I also add comment_count to my existing query? Below query works fine and sorts the archive with highest rating_avg only, I would like to sort my archive using rating_avg first and then the ...
1
vote
1answer
1k views

Filter posts under multiple categories?

How do I filter the posts by multiple categories? For example, if some of my posts are categorized under just apples and some as just oranges and some both, how would I filter the results to show only ...
2
votes
2answers
2k views

Sort Posts by Multiple Meta Values

1) Custom Post Type named "Buying_Locations" 2) Each Post has three meta values of: State, City, Store Name QUESTION: How can you show a list of these posts sorted alphabetically by State, then ...
0
votes
1answer
55 views

Sort posts by first letter in the title not by first number

down vote favorite I have a custom post type that's used to display properties on a client website. I am sorting the posts by the title but want to ignore any numbers included in that title. so to ...
0
votes
0answers
20 views

Sorting posts with a custom algorithm

What is the best way to be able to sort posts in WP_Query by an algorithm, such as: (total votes) * (1 / hours since submission)
0
votes
1answer
531 views

WP_Query -> sort results by relevance (= most tags / taxonomy terms in common)

I'm trying to write a new "related posts" widget (for the single post view) for my custom post type, filtering by custom taxonomy terms that the related posts should have in common with the current ...
2
votes
3answers
643 views

Sort users in get_users() in custom order

<?php $blogusers = get_users('include=5,6,2,7,12,8'); foreach ($blogusers as $user) { ... } ?> Right now, these users will sorted by first name. How do I sort this in the order the ...
0
votes
0answers
21 views

Listing the sites in my network in one page sorted by type

I have a WordPress multi-site installation and in my network I have many sites. I would like to have three lists that list the sites. Each list should show sites in specific city.
0
votes
3answers
47 views

Re-sort get_posts query results

I have a query that pulls fields from the 3 most recent posts for a carousel: get_posts('posts_per_page=3') I need to re-order the results so that instead of it being 1, 2, 3 it is 3, ...
0
votes
1answer
107 views

Sort posts by custom fields value using dropdown menu

I'm trying to sort my posts by a custom field value, called price. Only using numbers in the custom field value. I want that the visitors of the website can sort the posts on price by using a ...
0
votes
0answers
24 views

How to handle sorting and ajax pagination on 300+ items

I have 300+ posts in my db. They are tagged and categorized. When a user nav's to the News page, they see a list of the most recent 10 items (pretty standard stuff). I present a sort bar that sorts ...
1
vote
1answer
58 views

Sort custom taxonomy terms order by both count and name

I am working on a custom taxonomy sorting to make popular terms. The requirement is to sort by popular posts by post count and also I need to sort terms by name to get it alphabetical order. Here is ...
0
votes
0answers
36 views

Page 2+ of taxonomy archives does not recognise sort-order from dropdown

I'm using a custom taxonomy archive and I want the user to be able to organise it by 'latest' or 'alphabetical' along with other custom fields in a dropdown form. Seems to be working fine on the first ...
1
vote
1answer
38 views

How to rank custom post type from score points

I use a custom field with is casino_rank_scorewith stores a point rating for example 4.9 All casinos is stored on custom post type casinos. I need to figure out how to get a rank listing like ...
0
votes
0answers
18 views

Sorting events by meta date value after current date

I have custom post type "Events" and also have custom meta box date, in default mode its working and sorting events with published date, but i want changing events sort by custom date, i've added that ...
0
votes
0answers
48 views

How to sort users by registration date in the admin area of the Wordpress Multisite?

Wordpress Multisite has a sortable Registered column in the list of users in the wp-admin area. This is fine, but it sorts users by user id, not by registered date. How to change this?
0
votes
1answer
217 views

How do I sort multiples pages?

I want to use a dropdown to sort a list of posts in WordPress. The results will display on multiple pages. So how do I pass the query on to the second, third, fourth, etc. pages? Here's an example of ...
0
votes
2answers
23 views

Update meta_key value for a page

I have inherited a WP site where some home page slides are pulled using <?php $po = get_posts( array('post_type' => 'page', 'meta_key' => 'Home Slide', 'order' => 'ASC', 'orderby' ...
0
votes
1answer
34 views

How to order posts by the user_login that corresponds to a meta_value (which is a user id)?

I'm trying to create sortable column headers for a CPT list, but I'm stuck on one piece. When clicking on an "Assignee" column head, I want the list to display alphabetically by the login name of the ...
1
vote
2answers
10k views

Woocommerce custom loop to show all the products

I'm currently working on an e-commerce website and I met an problem. My client want a page e-boutique with all the product categories displayed, followed by 3 promoted products and a button "show ...
1
vote
1answer
42 views

Multi-level ordering in Wordpress

I have a collection of posts and first I want to order them by 'name' in ASC order and then order by 'date' in ASC order. How does one go about doing this?
1
vote
2answers
138 views

WP Query orderby meta key natural sort?

I have this code: $args = array( 'posts_per_page' => -1, 'post_type' => 'product', 'meta_key' => 'custom key', 'orderby' => 'meta_value', 'order' => ...
1
vote
1answer
199 views

Vertical alphabetically post columns

I need to create a 9 column list that outputs posts sorted vertical and alphabetically. I'm getting closer, but still not there. I have two separate loops I'm working with. The first loop I have the ...
2
votes
3answers
536 views

get_terms orderby name as numbers

I have a custom taxonomy filled with terms such as 'volume 1', 'volume 2', 'issue 1', 'issue 2', 'issue 10' and get_terms orderby name returns list as: issue 1, issue 10, issue 2 though I need it to ...
-1
votes
1answer
66 views

Get “wp_get_nav_menu_items” to sort alphabetically [duplicate]

I am trying to return a menu in alphabetical order and not the order set by the user in the backend. I have this code but it is not alphabetical: $args = array( 'order' => ...
2
votes
4answers
8k views

How to get Page/Post Gallery attachment images in order they are set in backend using WP_Query()?

I am trying to retrieve all the images from the Gallery of a page in the order they are set in the backend. So far I have: $my_wp_query = new WP_Query(); $all_wp_pages = $my_wp_query->query( ...
0
votes
0answers
56 views

Sort CPT by first letter of a meta field in a specific range

'I'm working on a way to display member profiles (Custom post type) sorted by the first letter of their last name in a given range. For example all members with a last name starting with 'A' up to ...
0
votes
0answers
89 views

How to sort all admin sub menu items in a custom order

i tried this solution given for this question Re-ordering Admin Submenu Sections to sort sub menu items of all top level menus. But i don't get it to work. I have an array of custom ordering of menu ...
1
vote
1answer
124 views

Sorting Custom Posts on Archive page with pagination

I've got custom taxonomy archive pages with a drop down list that allows users to re-order/sort the posts. It basically waits for the user to select from the drop down then uses array_merge( ...
0
votes
2answers
60 views

How to orderby meta_value_num with dollar ($) sign

The custom fields all have prices including $ signs, and a dot as separator. $theQuery = new WP_Query(array( 'orderby' => 'meta_value_num', 'meta_key' => 'price', 'order' => ASC )); All ...
0
votes
2answers
219 views

Custom Taxonomy Sort For a Custom Query

I am trying to custom sort taxonomies on a custom query I have written for one of my website I cannot use any custom plugin as I have tried and they do not work with my current setup. ...
0
votes
0answers
64 views

Sorting meta_value as integer doesn't work

This plugin uses the below chunk of code to print the top 10 highscores. But this doesn't get the list of top 10 scores sorted by meta_value in my WP install $scoreboard = new WP_User_Query( array( ...
1
vote
1answer
2k views

Custom Table Column Sortable by Taxonomy Query

I am looking to add a custom column to a custom post type post listing table in the dashboard. I have read many questions / answers on WPSE, along with this article. Although, it seems like everyone ...
4
votes
1answer
2k 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 ...
0
votes
1answer
23 views

Posts with no meta field do not appear when sorting by meta field

I want to order my posts by a custom meta field "fieldA". I am using the following code: $query->set( 'meta_key', 'fieldA); $query->set( 'orderby', 'meta_value_num' ); $query->set( 'order', ...
2
votes
1answer
113 views

How to make orderby 'meta_value_num' OPTIONAL?

$args = array( 'cat' => 5, 'posts_per_page' => 8, 'meta_key' => 'custom_sort_order', 'order' => 'ASC', 'orderby' => 'meta_value_num' ...
0
votes
0answers
20 views

Multisite: List all Blogs alphabetically [duplicate]

Right now I do this … <ul role="navigation" class="sektionen"> <?php $blog_list = wp_get_sites(); foreach ($blog_list AS $blog) { global $blog_id; ...
0
votes
3answers
146 views

Sort Posts By Category?

Googled this for hours, cannot find a solution. On my theme you have a Browse page which pulls all the videos from the Custom Post Type I am working with. If a user makes 30 categories then id like ...
1
vote
1answer
59 views

Taxonomy Terms - Orderby Custom Value

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: ...
0
votes
0answers
210 views

How to order custom posts type by number of facebook likes

I have a custom post type called "quotes" and I want to order these posts by facebook likes in the category page. How can I do this? Thanks.
0
votes
0answers
85 views

Query category-specific, paginated posts and allow viewer to change sort order

Maybe this has already been asked here, but I can't seem to find a solution, so forgive me if this is a duplicate. I have coded a custom template to display all posts from a category with the ID 36. ...
0
votes
0answers
40 views

How to let users sort list of categories?

In my homepage, I have listed all of categories, under which their posts, are listed like this: Category 1 post 1 post 2 post 3 Category 2 post 4 post 5 post 6 ...