The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
14 views

Complex WP_Query order request: DESC by day, but then ASC by time

I've got a site with a couple thousand time-stamped posts in a custom post type. These get displayed by a few taxonomies and a date query in various views (I've got that all working just fine ...
0
votes
0answers
14 views

Order by custom field returns nothing [on hold]

im trying sort post by a custom field but i have no sucess: echo vp_metabox('meta_eventos.evento_data_start') Show one date, example: 16-03-2015 I need to sort posts by this date, im trying use: ...
0
votes
1answer
14 views

Using orderby with 2 meta keys

I can use orderby with one meta key in the WP_Query using following: 'orderby' => 'meta_value_num', 'meta_key' => 'my_key_1', However is it possible to use orderby based on the calculation ...
0
votes
1answer
15 views

WP_User_Query orderby meta_val_num

I know that normal WP_Query's can have an "orderby" parameter of "meta_value_num", but when I try to user "orderby" => "meta_value_num" on a WP_User_Query, it doesn't seem to work. Anyway I can ...
0
votes
1answer
15 views

Creating a post that contains a list of other posts like a table of contents

Is it possible for a post to contain a list of other posts, with a custom ordering like a table of contents? Similiar to the above but is it possible to create a category with a custom ordering of ...
1
vote
1answer
40 views

How to order a post type with meta_value_num and if meta_value_num does not exist then order by date

I want to order a list of post on basis of ratings. I have used meta key "wp_ratings" for storing the rating value in wp_postmeta table. Now I want to sort all posts . If a post does not contains the ...
0
votes
1answer
51 views

WP_Query custom order and pagination

I am seeing some strange behaviour when combining a custom order with pagination when using WP_Query. The arguments for my query are as follows: $args = array( 'post_type' => 'news', ...
0
votes
1answer
20 views

Want to order by Meta Values (tweaking Post Order Widget)

I'm not much of a coder, but I can tweak PHP a bit. Basically I want to order by a custom meta value which integer called "price". The plugin orders by title, so thats what I'm changing to price, ...
-1
votes
0answers
11 views

custom post order next blog post order

I wonder how to achieve the following: instead of using the dates of posts to order content, it would be good for me to have the content ordered by a custom order, i require that when the last post ...
0
votes
1answer
29 views

Order posts by custom column using pre_get_posts

Is it possible to sort posts by custom column in wp_posts table (in this case, 'fav_count' column) using pre_get_posts filter? If not, is there any other way to do this before the main query is run, ...
0
votes
0answers
21 views

Sorting “menu_order” does not work in WP Query with multiple post types

When i use my WP Query as follows: $post_types = array('research'); $args = array( 'posts_per_page' => 10, 'orderby' => 'menu_order', 'order' => 'asc', ...
0
votes
1answer
30 views

Display Custom Taxonomy Terns ordered by meta_value

I got stuck with ordering custom taxonomy. I've created a hierarchical custom taxonomy called Brand and created some meta tags including one called position. Now I would like to display my terms ...
0
votes
1answer
97 views

Sorting terms individually for each post

I have a custom taxonomy named author containing multiple terms. The default output order in the front end is alphabetically. But I like the authors to be ordered individually per post, e.g. First ...
1
vote
2answers
61 views

Custom post type archive with rand and meta_value

I have a custom post type that have a meta_key custom_meta_sponsored that owns alphabetical values. "X" means post doesn't sponsored. I want to show the archive page in custom order, sponsored first ...
-3
votes
2answers
49 views

Post list category plugin alphabetical order [closed]

Is there a way we can set these to list the posts in the category by alphabetical order?
0
votes
1answer
36 views

paginate_links() Change the order of links

While using paginate_links() function of WordPress, i need to change the order in which it echo's its output. For example, by default it will output pagination links in this format: Default Output: ...
0
votes
0answers
37 views

Order posts by ACF checkbox

I would like to order the posts (archive.php) by listing the ones with the ACF checkbox "Premium" first, could someone please offer some advice?:) This is what I've tried so far: <?php echo ...
0
votes
1answer
18 views

Add filter to Orderby Parameter using Array

Using WP-Query, I'm setting the Orderby parameter using an array: $events_args = array( 'post_status' => 'publish', 'post_type' => 'events', 'meta_key' => 'start_time', ...
0
votes
0answers
26 views

Dynamic change order value

I have custom post type "Movies" and I have added order attribute to it. add_action('init', 'my_custom_init'); function my_custom_init() { add_post_type_support( 'Movies', 'page-attributes' ); } ...
2
votes
3answers
56 views

How to order posts (woocommerce products) alphabetically but ignore certain words, eg 'The' and 'An'

I need to order my Wordpress posts (that happen to be Woocommerce products) alphabetically, but I want to ignore certain words, eg. 'The' and 'A' and 'An'. Is there a function or filter that can be ...
0
votes
1answer
49 views

shortcode order for event custom post type

ok im working on a website using post type event with post_meta event_start_date, i created a shortcode and everything is displaying fine except for it displaying in order, it seems as its not ...
0
votes
2answers
41 views

Order posts ascending with number in title

I have a page where I show the teams of a football club. I order these with 'order' => 'ASC'. But the problem is that the teams order like I want it to. It orders like this: Team E1, Team E10, Team ...
4
votes
1answer
82 views

How to get order of posts?

How can I get the order through which the query is done? For example, my woocommerce product archive page is querying by ordering according to the order_by select box (as seen below). How can I get ...
2
votes
1answer
60 views

Order tags, but not alphabetically

I'm trying to figure out how to arrange tags on a post using a method other than alphabetically. For example, a post has the following tags; alpha, beta, charlie. The post will always organize tags in ...
0
votes
1answer
57 views

Sorting posts by custom date fields (non standard date format)

I've inherited a website with a post type courses that has a custom field 'date-start', a Date Picker. Unfortunately the date start is stored as 'ddmmyy' and the ACF documentation implies that this ...
0
votes
1answer
17 views

Re-order posts in query after

For a particular category I needed to merge in another custom post type. Now I would like to resort the query based on a custom field. Is this possible? Below is the way I've merged the queries. if ...
0
votes
1answer
65 views

Order posts by tags count?

I am trying to order posts by tag count. I want to order posts with no tags first and posts with highest count last. I tried and got posts with no tags only. $tags = get_tags(); $tag_ids = ...
0
votes
0answers
23 views

custom post type taxonomies order desc

this code works fine here http://wellspringchurchnc.org/redesign/sermons/ but i can't seem to change the order to display in descendent $args = array( // 'posts_per_page' => 1, //'order' ...
0
votes
2answers
33 views

Querying with WP query using meta key price

Could somebody tell me what's wrong with my WP query please? I'm trying to order my posts by price and price is an ACF (a textbox which has a number in it) $args = array ( ...
0
votes
0answers
26 views

WordPress search results order

Is there any way to change the search results order? For example, I would like to order as following: Pages, Category 3, Category 2, the rest. I have no idea where to start from, but I suppose that ...
3
votes
2answers
221 views

Ordering posts having multiple post-meta date fields

Hello WordPress developers. Over the years, I've found answers to many questions I've had with WordPress. I want to thank you for your help. Today, I have a question myself, and seek for expert ...
0
votes
0answers
22 views

Order main loop by category and then post_date

I'm creating an "announcement" post category. I'd like those posts (using the category id) to appear first in the main loop sorted by post_date desc and then the rest of the posts sorted by post_date ...
0
votes
0answers
16 views

Sort get_term_children when they are inside an array

At the moment I have this code below, but it doesn't sort the children. There are some answers on this website, but they involve a known category ID, while in this case the child categories are in an ...
1
vote
1answer
87 views

multiple orderby in pre_get_posts action

I used to be able to sort query results by 2 criteria ("sort results first by status=unsold ASC then by date DESC) like this: add_action( 'pre_get_posts', 'my_get_posts' ); function my_get_posts( ...
1
vote
2answers
93 views

List posts in alphabetical order

What I'm trying to achieve is to set the list shown in alphabetical order. Any thoughts on how i can successfully achieve this? I have pasted the snippet below for reference. <ul ...
1
vote
1answer
159 views

Sort Order for a Custom Query in a Post Type Archive Not Working

I have a custom post type for events set up and am displaying the posts in a custom post type archive "archive-events.php". I am using Advanced Custom Fields to put an event date "event_date" on ...
0
votes
0answers
50 views

Custom Admin Menu Order

I have a simple solution in my functions.php for reordering the admin menu. Here it is: // Admin menu - reorder function custom_menu_order($menu_ord){ if (!$menu_ord) return true; return array( ...
-1
votes
1answer
47 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 ) { ...
1
vote
1answer
40 views

Order posts by condition

I need to get 15 posts. If there are any with a tag featured, I want them to be first. If there are none, I want the rest to be random posts. My idea was to sort posts based on a condition ...
4
votes
1answer
67 views

How to put last edited entry on top of the blog-post list?

In the list of my blog posts, the "last published" entry is on top. I'd like to view the "last edited" entry on top of that list. I couldn't find a setting for that, so how can I realize it?
0
votes
2answers
91 views

ascending order custom post type

I'm trying to sort a custom post type in ascending order (instead of the default descending). Registering the post type like so: function codex_custom_init() { register_post_type( 'calendar', ...
0
votes
1answer
41 views

Order WP_Query results in order other than ASC or DESC

I have pages with a custom field "language" which can be, say, "EN", DE" or "FR". On a category page I want to output them in a specific order, say, first EN pages, then FR pages, then DE pages. It ...
0
votes
0answers
9 views

Where is object, property or label in the database that controls the order of the posts being displayed?

I'm trying to update the database once the user has re ordered the posts via a draggable js plugin whilst is_user_logged_in(). I'll probably have a save button on the front end (in logged in mode of ...
0
votes
0answers
23 views

Ordering a custom meta query

I have a events custom post type. Each event has to meta fields: eventstart and eventend. These are both YYYY-MM-DD style dates. I am trying to get a list of my events that have a start date OR end ...
1
vote
2answers
138 views

OrderBy multiple custom meta fields

I have a custom post type in my plugin named members, along with two custom fields; first_name and last_name. I am trying to order my listing my the last name, then the first name. The only solution I ...
-1
votes
1answer
64 views

Can One Taxonomies Terms be Ordered by A Seperate Taxonomy?

I need some advice. I have a post type called "Movies" for example. Inside Movies, I have two taxonomies: Genres and Ratings Under Ratings my terms are 5 star, 4 star, 3 star, etc. Under Genres ...
0
votes
2answers
33 views

Changing posts order on a page

I have a template that has a dedicated page for STAFF. The only problem is, I can't rearrange the entries. In other words, all the entries are automatically sorted based on time when the data was ...
0
votes
0answers
79 views

Show sticky post before other WP_Query

$recent_posts = new WP_Query( array('posts_per_page' => $blog_num_posts, 'paged' => $paged, 'post_type' => 'post', 'post_status' ...
1
vote
1answer
55 views

How can i define the order of blogs in a multisite network manually (like pages)?

I created some blogs in a multisite network but now i need the possibility to control the order of those blogs. There is a list of all blogs on the main page and it is ordered by blog id by default, ...
0
votes
2answers
19 views

Filtered by a custom field, ordered by another

I am trying to loop custom post-types, filtered by a custom field artist-status => invited and ordered by another custom field last-name alphabetically. Here is what I managed to write, and it ...