1
vote
1answer
60 views

Display multiple custom post types and sort them chronological by one of their fields

I have four custom post types created with the custom post types ui plugin; each stands for an event type with a different set of custom fields created with the advanced custom fields plugin. My ...
0
votes
1answer
58 views

Get the type of an advanced custom field (ACF) in a WP_Query loop [closed]

When reading posts with WP_Query how would I get the data type of an advanced custom field (textbox, date, number, repeater, …) ? My code: $loop = new WP_Query( $args ); $posts = ...
0
votes
1answer
65 views

filter wp_query result with custom field values

I'm getting started with advanced custom fields. I have a category field (main_category) where the categories given below are selected using the radio buttons. 1. Electronics 2. Programming 3. ...
0
votes
1answer
132 views

Get all fields inlcuding “ACF” (Advanced Custom Fields) columns in wp_query

When retrieving posts with wp_query how do I make the loop contain the acf fields? $args = array( 'post_type' => $postTypes, 'posts_per_page' => $numPosts, ...
1
vote
0answers
122 views

Query by 2 values of a repeater ACF field

Let's say I have a custom post type called Film, with a repeater field called Showings, with fields start_datetime and discount. I need to make a query for those Films that have at least one showing ...
0
votes
0answers
133 views

how to get sub fields using advanced custom fields?

I am a compete beginner with Advanced Custom Fields. I would like to get your help in understanding acf well, most probably a simple question. I have a blog I use acf to categorize the posts. I use ...
2
votes
1answer
73 views

WordPress meta_query and order by custom field

I have a Custom Post Type called "Films", with a Repeater field called "Showings", which have a field "start_datetime" of type DateTime... I want to perform a query to get all those Films with a ...
0
votes
1answer
54 views

Remove Post if Advanced Custom Field is checked to fix paging

I'm trying to setup a query that filters through posts and removes ones that have an ACF field "archived" checked. Post queries are pretty foreign to me. ...
0
votes
1answer
178 views

Using WP meta query to show custom post types by a start and finish date

I have a custom post type called 'events', I have a page which displays events by each month. Each event has a start_date and finish_date custom field (using advanced custom fields plugin) which ...
0
votes
3answers
225 views

ACF: post query, hide duplicate values [closed]

I'm querying an ACF field, and displaying all the results on the front-end like so— PHP: <ul class="category-menu-items"> <?php // args ...
0
votes
0answers
63 views

Query posts filter not working

I have created one custom post type which name is villa. In this post type I have added five post and assigned custom field values(mention bellow): Post Name Assigned Fields 1. Chalet ...
0
votes
1answer
292 views

Query current and future events, ordered by begin date

Using the Custom Post Type UI extension, I've created a 'Event' custom post-type, which fields are populated using custom fields (created with the extension Advanced Custom Fields) such as ...
0
votes
1answer
58 views

Creating array to compare custom field values

I think I need some guidance here. I have a list of custom posts on a an archive template page that displays information from each of the custom posts. They are looped through using WPQuery: ...
1
vote
0answers
116 views

WP_Query with meta_query dosen't return results

I am trying to get list of posts filtered by fields I added using the advance custom fields plugin. I have more fields that I want to use but it doesn't work as I want it to. Here is what the query ...
0
votes
0answers
158 views

Custom Post Type and Advanced Custom Fields

I am trying to build a sidebar widget that will query my custom post type called events. What I'd like it to do is query the posts for any post with a matching meta key value that is similar to ...
1
vote
1answer
51 views

How do I run through a Wordpress loop called from a filter function?

So I'm trying to populate an Advanced Custom Fields selectbox with a nice complicated array based off some post data. I've been trying to do this by doing a custom query and loop through the returned ...
0
votes
1answer
64 views

How to Order Posts by Custom Fields?

Can someone tell me why this is not working: $args = array( 'cat' => '2,39,30', 'orderby' => 'title', 'order' => 'ASC', 'orderby' => 'meta_value_num', 'meta_key' ...
0
votes
1answer
413 views

Query based on custom fields start and end date

I have a custom post type called Events, with 2 custom fields, start date and end date. These fields are stored using a timestamp in the database. I want to create a custom query based on these 2 ...
1
vote
4answers
166 views

wordpress ajax relationship query

Using the relationship field from Advanced Custom Fields I link artists to events. Both these artist and events are custom post types. For each event, the post IDs of the related artists are stored in ...
0
votes
0answers
271 views

Using a query to display custom post types based on ACF post_object

Basically the set up I currently have is two sets of custom post types which are: uc_university and uc_course I'm having lots of trouble trying to display a course based on a my Advanced Custom ...
0
votes
0answers
67 views

Sort Custom Post Type entries by 2 custom meta fields

I'm trying to create a page to display publications by year and date. The issue I am running across is that I can sort by only one of my custom meta fields. I have a custom post type called ...
0
votes
1answer
28 views

Custom Post-type not returning the right child_of

Situation I am using the Advanced Custom Fields plugin to give Custom Post Types a checkbox. If this box is checked, it should be returned by this Query. The Query works this far. The issue The ...
1
vote
1answer
2k views

Using OR conditions in meta_query for query_posts argument

I have searched high and low for this but I cant seem to locate anything. I am trying to filter some results and when I make an args array like this and pass it to query_posts I noticed that the ...
0
votes
0answers
123 views

Search with meta_query and tax_query

I'm working on a little database for series based on wordpress. I've implemented a custom post type called "anime", some taxonomies (Genre, a_types..) and a lof of customfields. (based on acf). Now ...
0
votes
1answer
711 views

Filtering a WP_Query meta_query by numeric values isn't working

That was a very dense title. I have a custom post type "event" which has a Date/Time picker field "event_date" thanks to the Advanced Custom Fields plugin. This Date/Time picker saves a UNIX ...
2
votes
1answer
1k views

Advanced Custom Fields query

I have, hopefully easy question. I have my query here, which is using ACF <?php query_posts(array('post_type' => 'our-clients-list', 'posts_per_page' => 1, 'order' => 'DSC', 'orderby' ...
0
votes
1answer
107 views

Is there a better way to pull in custom content without querying posts?

I have a custom page template that pulls in media files via advanced custom fields, as well as query posts. Now, the client wants there to be three sections by default... each one populating with the ...
2
votes
2answers
205 views

Minimising number of queries on a page when using Advanced Custom Fields

I'm currently working on a site where there is extensive use of the popular Advanced Custom Fields plugin. However, as a result the page loading time can be quite slow, especially when using the ...
0
votes
1answer
1k views

meta_query with array as value

I am writing some PHP which allows users of my site to submit a form and query posts by their post_meta. Everything works fine except for one thing, I used Advanced Custom Fields to create the ...