All Questions
Tagged with custom-field order
76
questions
0
votes
1
answer
33
views
Sort wp_query of two post types using meta datefield for one and date for the other - possible?
I have two queries that result in id-arrays that I merge into a common array which, in turn, has all the posts I need from the two post types (posts, events). However, in the sorted list I would like ...
0
votes
1
answer
259
views
WP_Query sort by ACF date field (newest first) with blank dates first
I have a custom date field that is optional. If a date is not provided, the item should be first in the items returned by WP_Query. Example:
1st: entry with no date
2nd: entry with date 1 March 2023
...
0
votes
0
answers
337
views
Access custom meta_data in processing order email
During a woocommerce order, I store a custom meta data inside the order.
I would like to display that created custom meta data into the "processing order" email.
The following code is ...
0
votes
1
answer
21
views
Having Issue on Ordering CPT by Custom Field In Custom WP Query
Having a Custom Post Type loop like this, I am able to return the result on page BUT I am not able to set Order By of display using my own Custom Field.
As you can see here
$topic_number = ...
0
votes
1
answer
178
views
Ordering posts by anniversary using only day and month
I defined a custom field named crimedate using standard date format Y-m-d. I defined the filters to make ordering by this date work in the post list of the backend, which works fine.
Now I need the ...
0
votes
1
answer
380
views
Ordering posts by custom field named "date" in backend
I defined a custom field named "date" and now want to order the post list in the backend by this field.
I defined the filters to make ordering work and header is clickable and shows the ...
0
votes
0
answers
61
views
Orderby if between two meta fields
I am trying to orderby my CPT if the current time is in between two meta fields. (i.e, the current_time() is between two time fields.).
meta_query returns only the posts that are between the values, ...
0
votes
0
answers
29
views
Modifying category order
I am working with a directory style wordpress theme that displays categories in masonry style columns with their posts listed under each category title. The categories are appearing on the front page ...
0
votes
0
answers
214
views
Ordering by ACF custom field vaule
I'm using ACF field for post ordering. Now I have positions for 1-5 for post display, so you can select on which position post should appear. Only thing that I can't achieve right now for example is ...
0
votes
3
answers
2k
views
Sort by an ACF field in a tax_query
I do not find the solution which must surely be surely simple. (I'm new to WP)
I have an ACF field named "partners_order".
I would like to sort it in ascending order (ASC)
here's what i tried
<?...
1
vote
1
answer
287
views
Order RSS content by an advanced custom field value
I have created a custom post-type called "event".
For this custom post-type I created an advanced custom field called "event_date".
Now I am trying to display the list of my events in a RSS feed.
...
0
votes
1
answer
285
views
query posts custom field calculation value
I have a front-end form whereby users create a post and input 3 numerical custom field value` as part of their post.
These 3 custom fields are then calculated and the result is displayed in the post....
0
votes
1
answer
73
views
Order posts by meta key ( Using ACF )
Hey I am using ACF in media library and want to sort media by meta key (that is actually created by ACF). BUT it is not working.
Here is the code:
$gallery_imgs = get_posts(array(
'post_type' ...
0
votes
0
answers
89
views
WordPress Admin - Automatically Sort Custom Posts by Custom Field Date Value in d-m-Y Fomat
I have a custom post type called 'Courses'. I'm currently trying to automatically display them in the dashboard 'Courses' post list sorted by a date value specified in a custom field.
The date value ...
1
vote
0
answers
199
views
Understanding the orderby in WP_Query?
For quite a while I have been trying to query posts, with 2 different meta_queries, and order them differently. I followed the WP codex. Recently I have found out that I have been mistaken this ...