All Questions
Tagged with custom-field query
97
questions
0
votes
0
answers
22
views
Can I log the searches that are returning 404 in the DB?
I would like to log every single search query for which one gets 404. For example, if I search Cat in the search box, but my website doesn't have any content as cats. I would like to log that "...
1
vote
0
answers
69
views
Is there any way to get all meta and standard columns for any WordPress object after searching based on meta key and value
I have a scenario where I have a meta key and value and a WordPress object name, I want to search based on the meta key and value and retrieve all details stored in db, for example if this is for a ...
0
votes
1
answer
99
views
How to conditionally add Custom Post Type to Front Page
I am using the following code to show my custom post types on my front page along with the default post type:
// allows the products to show up on the main page
function add_custom_post_type_to_query( ...
0
votes
0
answers
41
views
Query multiple post types, but different order for each
I have a query which searches 2 post types as below:
$args = array(
'post_type' => ['post', 'promotion'],
'posts_per_page' => 12,
'paged' => $...
1
vote
0
answers
419
views
Compare ACF date field (if exists) and post date and order DESC
I have an ACF date field (same format as post date) and in my Query I want it to be compared to the publish date of the post:
If erstelldatum is not empty use erstelldatum for order
If erstelldatum ...
0
votes
2
answers
403
views
List custom queried terms in the edit-tags.php?taxonomy page
This is my first time posting a question here.
I have this problem that I feel that I am soooo close to solve, but can't manage to do it.
I have a custom taxonomy called "aplication" and ...
1
vote
1
answer
943
views
Only display posts after current date
All my posts have a custom field named date-start-custom. The value of the custom field is in the date format YYYY-MM-DD HH:MM (e.g: 2021-06-15 14:30), and I want to only list posts that has a date ...
0
votes
1
answer
27
views
Using OR relation in meta_query to check for a value before sorting by another
I am writing a pair of queries for a site with an events listing function. Events can be either on a single date or over several (multi-day). All events have a value in custom field event_date. Multi-...
1
vote
1
answer
28
views
Querying Two Custom Post Types with OR Not Working
I'm trying to query two custom post types - I want all research_article to return, but only events that are in the future. My events are working as expected, but I'm not getting any research_article ...
0
votes
1
answer
503
views
Dynamically populate query source in Elementor post widget
I want to call dyanamically categories in the post widget of Elementor. I created a function to call results from a field created with ACF (a dropbox select of posts categories):
add_action( '...
2
votes
1
answer
241
views
Having trouble with custom date field for CPT query (Wordpress)
I've read as many of the questions and answers on here as I can find and none of the solutions are working for me. No idea what I'm doing wrong here.
I have a CPT 'event' with meta key 'start_date' - ...
0
votes
0
answers
36
views
WP_Query not ordering correctly
I have two custom user meta fields created with ACF. One is quantidade_corretas_dia_4 (Numeric, integer) and another tempo_dia_4 (Numeric, decimal). I am using WP_User_Query to get users ordered by ...
0
votes
1
answer
217
views
Meta query and compare "!=" not working as expected
I realize that maybe this could be an already submitted question and I searched for it, but couldn't find it.
I've got the following simple meta query:
if (!is_admin() && ...
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
0
answers
26
views
Need to display a Jan 1st post as the site's front page on Jan 1st, and Jan 2nd post as front page on Jan 2nd etc
slightly unusual client request. I'm using Divi and I have a nice Divi layout created for a video and text post which is ready to go. The client wants to create 365 posts (one for each day of the year ...