Skip to main content

All Questions

Filter by
Sorted by
Tagged with
1 vote
1 answer
8k views

Advanced Custom Fields: Post Object - Not returning data [closed]

I have a custom post type called "Training" with an archive page (archive-training.php). I have another custom post type called "Courses". I am using Advanced Custom Fields: Post Object to link "...
user1385827's user avatar
1 vote
2 answers
2k views

How can I add multiple 'tax_query' arrays via a loop?

I'm trying to build functionality (using the Advanced Custom Fields plugin) to list information in a page template for all custom post types ('Product') that have specified taxonomies. This is my ...
LCW's user avatar
  • 33
1 vote
1 answer
853 views

ACF page while loop breaks footer while loop

So basically i have a main page and a footer page. Both are seperate .php files. Im using ACF for this site. Following the documentation, ive created a while loop for my 'flexible content' in the ...
Ylama's user avatar
  • 111
1 vote
1 answer
2k views

Using Advanced Custom Fields to create a per page slider

I am looking to create a slider that uses ACF to display a separate slider on each individual page that has its own images loaded into the gallery field. I have currently created the slider using ...
user53340's user avatar
  • 103
1 vote
1 answer
541 views

Stuck in the query loop

I created a two loop into my WordPress page. It should get the category name and should load all the child under the Category name. Like this ____ Cat1 ______ product 1 product 2 product 3 ____ ...
Amir's user avatar
  • 111
0 votes
1 answer
2k views

List events by month

I am working on a WordPress site consisting of a custom post type called "events". Each "event" consists of a custom field called "event date". I'd like to organize all the "events" by months based on ...
user2971921's user avatar
0 votes
1 answer
563 views

Show ACF field with link to ultimate member profile/Wordpress user profile below the post (single post layout)

I'm using Advanced Custom Fields and I'm trying to show a custom field below the single post. I managed to get the code to render below the post, but when I set the field movie_actors and save, the ...
023023's user avatar
  • 135
0 votes
1 answer
2k views

ACF - Get ID of relationship field in flexible content

I'm trying to get ID from a relationship field within a flexible content and push it in a array if (have_rows('studio_blocs')) { while(have_rows('studio_blocs')) { the_row(); $...
Jandon's user avatar
  • 147
0 votes
2 answers
500 views

How to output values from a loop into a javascript array

I'm building a custom shortcode in Wordpress. Essentially what I want this to do is the following: Dynamically pull values from a group of Advanced Custom Fields Output those values into a javascript ...
Noah's user avatar
  • 1
0 votes
1 answer
928 views

ACF background-color per post in a WordPress loop

I have the following loop in WordPress: <div class="container"> <?php $news = array( 'post_type' => 'post', 'category_name' => 'angebote', 'order' =...
Dario B.'s user avatar
  • 155
0 votes
0 answers
743 views

PHP for loop not working as intended

I was using if statements to check if a custom field exists and if it does, to output some HTML. Since the number of fields was getting bigger I used a loop and it worked on one website: ...
Sergi's user avatar
  • 260
0 votes
0 answers
115 views

Display related post content and custom field content

I'm having trouble trying to display related post content and custom field content from one custom post type to another. The Custom Post Types and posts are as follows: CTP1 - page title 1 - page ...
Amesey's user avatar
  • 125
0 votes
1 answer
2k views

ACF field not appearing correctly in loop

There is a loop in my theme that displays posts with the following information: a title, some text, and a price. I have added a custom field to this post type using ACF. The field ID is tour_length. I ...
Ciaran Gaffey's user avatar
0 votes
1 answer
268 views

ACF loop and php formatting

The following php will loop through each page and then output ALL of the ACF custom fields sequentially. What I need help formatting is a conditional statement that places all $fields, except $...
sweeds's user avatar
  • 117
0 votes
1 answer
427 views

the_post_thumbnail unless video id is added

I have 2 choices on the edit post page to insert an video ID from either vimeo or youtube. The user needs to select, with a select field (channel), if he wants to embed video from one or the other. &...
Kortschot's user avatar
  • 117
-1 votes
1 answer
3k views

ACF loops false value with repeater and checkbox

I have an ACF repeater field setup on a page and within the subfields I have a True/False checkbox. So far, if the box is checked, it will show the fields. If not then it will not. However, the one ...
ultraloveninja's user avatar