The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
2answers
21 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
15 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 ...
0
votes
0answers
31 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 ...
-3
votes
0answers
25 views

woocommerce - send order email notification to customer approval [closed]

I'm building an e-commerce site using woocommerce, my business is like Business to Business (B2B). There is a lot of company that will use my system, every company will have one "Approval" and have ...
0
votes
0answers
14 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
14 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
31 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
66 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 ...
0
votes
1answer
66 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
18 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
33 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
33 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
59 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
45 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
38 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
8 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
21 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
105 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
59 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
25 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
53 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
42 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
18 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 ...
3
votes
2answers
136 views

Query by one meta_key and sort by another (possibly NULL value)

I want to query by 1 meta key, but sort by another key that may or may not exist, and then by post date So the end result would be something like: Meta Key A / Date 1 Meta Key A / Date 2 Meta Key B ...
0
votes
0answers
61 views

WP_Query Order by Specific Post ID First

I'm creating a website where I have a need to show a set of posts from a custom loop but I need to display a specific post first. This post will be dynamically specified in the URI by a $_GET ...
0
votes
1answer
41 views

Orderby two meta fields not working

Good day. I have the following code: $args = array( 'post_type' => 'property', 'tax_query' => array( array( 'taxonomy' => ...
0
votes
2answers
116 views

WP_query orderby not working after WP4.0 update [closed]

On my Wordpress-website, I have a custom post type used to display events and a page showing all events in the database. On that page, I'm creating a new WP_Query and displaying the results ...
0
votes
0answers
92 views

Custom Post Type admin order by usermeta value

I would like to allow admins(and users) to order the listing of posts by editor(custom role) last name(ASC or DES) while viewing the listing of posts in the admin area. I have a custom post type that ...
0
votes
0answers
34 views

Inconsistent post order using wp_insert_post

I am retrieving a consequent (~4000) number of posts from a database that I want to save to my WordPress database. I am inserting them this way: include("wp-config.php"); $con = ...
0
votes
1answer
28 views

Custom query to order by multiple taxonomies

I got this website from a customer to fix some bugs. They are a car dealership. The previous developer created a custom post type (vehicle) and there are two taxonomies: make and model. (they are not ...
0
votes
2answers
52 views

How to display custom post type ordered by a custom field date

I have a custom post type for a timeline activities. each post of them has a custom field type of DATE. field name :activity-date I'm using TYPES plugin for Custom Post Type and Custom Fields I ...
3
votes
3answers
310 views

Display all posts in category, with specific tag posts at top

Rephrase question I need to order posts inside the loop for my category car. What I need, if I visit the category page of car, I need all posts tagged BMW to display first, and then the other posts ...
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 ...
0
votes
2answers
168 views

Order get_terms using a Custom Field

I have a custom taxonomy of "crb_issues" that has a custom field associated with it that is "issue_date" which outputs a date value for each term to looks a lot like "20140601" yearmonthday. I am ...
1
vote
1answer
87 views

How to set order for a custom post type

I'm trying to integrate a slider custom post type into WordPress and I can't seem to set the order (orderby:ID, order:ASC) for that custom post type. I've added the supports => ...
1
vote
1answer
67 views

How to set multiple `orderby` in query argument?

I am trying to fetch pages by multiple ordering. menu_order in descending and title in ascending. Following is the argument: $args = array( 'post_type' => 'page', 'posts_per_page' => 20, ...
0
votes
1answer
75 views

Order posts by date and then by custom field

I am trying to do something like this one. Ordering posts by day (not time) AND meta value I want to list blog posts ordered by date (not time) and then within that day, I want to sort them by custom ...
1
vote
1answer
144 views

Ordering by meta_value AND date NOT WORKING with wp_query

I want to select posts and custom post type with a specific meta value (mb_home!=0), of last week and ORDER them by mb_home. If they have the same mb_home value, I want them to be ordered by date. ...
0
votes
1answer
68 views

orderby parameter not working in custom query

I have a really strange issue for a site I'm updating... All I want to do, is have it so that the posts come in descending order instead of random. I have the following code, but when you change it ...
0
votes
0answers
41 views

Auto order posts of custom post type by title

I have a custom post type which has more than 50 posts. I want to reorder them alphabetically so that each time I post anything the system automatically reorders. Please don't suggest post order ...
0
votes
1answer
200 views

Make a vertical dynamic list of posts in alphabetically order and in columns [closed]

I have a page that lists all the posts from a given category of an custom post type dynamically. I do this with a plugin that list posts and a shortcod and with css i created 9 columns where they are ...
0
votes
0answers
21 views

Re-order posts inside tax query

I have some posts having some custom fields and their value. I have custom fields like featured and expiry_date, whose values are yes/no and some date respectively. All these posts are coming under ...
0
votes
0answers
24 views

Sort WP Taxonomies

Is there a way to sort a custom taxonomy term list in order of recent updates to posts inside that taxonomy? Example: Custom Post Type: Research Custom Taxonomy: University Research Custom Tax ...
0
votes
0answers
92 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 ...
0
votes
1answer
48 views

Sorting posts by Multiple custom fields in defined order

I'm currently sorting some posts out by custom fields 'role' and 'surname', using the following: function customorder($orderby) { return 'mt1.meta_value DESC, mt2.meta_value ASC'; } $args = ...
0
votes
0answers
11 views

Is there easier way not to display all images attached on the page from media?

I'm thinking not to delete the images I attached on the page, but will just have conditions not to display images with order set to 0. If I have code like this: $thumbnail_ID = ...
0
votes
0answers
27 views

Order by post_type within loop

Envision the following: <?php $args=(array( 'post_type'=>array( 'premium_content', 'post'), 'posts_per_page' => 3, 'orderby' => 'PREMIUM_CONTENT_FIRST!', 'meta_query' => array( ...
0
votes
2answers
23 views

Order Custom Posts by Several Fields

I have a page that lists out the members of our band, as a custom post type. I am trying to order the members by several custom fields, field by category, or "section, then by their class, and then ...
0
votes
1answer
38 views

Where is the order of a menu saved in the database

I want to use a custom menu from the wordpress database but I get the elements disordered and I want them to have the same order how can i do that? There is a place in the database where the order is ...
0
votes
1answer
30 views

$args Orderby The number

I have this code $cat_args=array( 'include' => '42,210,21', 'orderby' => '42,210,21', 'order' => 'asc' ); $categories=get_categories($cat_args); foreach($categories as $category) { ...