Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
2 answers
351 views

ACF - How to get custom taxonomy term image field

I have loop that displays only the direct children of a term on a taxonomy page. I also have image field, attached to custom taxonomy. Now, I want to display image in my page template: <?php $...
och's user avatar
  • 39
0 votes
0 answers
42 views

Wordpress post objects in one parent post object

I'm creating an event page where we can add an event line-up. Such a line-up consists out of different speakers. So I've create two custom post types: Line-up Speaker On my event page you can select ...
Dennis's user avatar
  • 135
0 votes
1 answer
184 views

WP_query shortcode inside acf Repeater breaks the repeater loop

I have a shortcode that lists CPTs and works great everywhere but if I use the shortcode in an ACF repeater the reapeater stops repeating right after the shortcode. I tried reseting postdata in ...
Joe Barrett's user avatar
0 votes
0 answers
91 views

Update post meta with wp cron

I am trying to create a function (which I will trigger through the WP Cron) but no values are passed and the database values remain NULL. Could anyone point me in the right direction of where I'm ...
Rein's user avatar
  • 1
0 votes
1 answer
133 views

How to make posts unqueryable/unpublish posts where ACF relationship field is an unpublished post? [closed]

I am using ACF Pro to make a relationship between two custom post types. One CPT is a thing and the other is a Container of Things. I need to solve the issue of things within a container of things ...
Jordan W.'s user avatar
0 votes
1 answer
90 views

ACF to select posts not displaying on blog page

I am trying to implement a repeater / post object so I can select posts that I want to displaying on the sidebar. I am using this code: <?php while ( have_rows('top_posts_repeater')) : the_row(); /...
Leandro Andrade's user avatar
0 votes
1 answer
522 views

ACF flexible content block not showing on live site (works locally)

I've made a flexible content section in ACF for a specific category that allows the user to post text and different image galleries onto their post. This all works perfectly whilst I'm on my ...
Laura's user avatar
  • 1
0 votes
0 answers
24 views

ACF: display custom filed of CPT into the loop

I have a CPT called Project (Projects in plural) and I am displaying it in the loop into a column. I would like to display a custom field I have into this CPT (called "type") underneath the ...
xagih's user avatar
  • 1
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
768 views

Populate select list with meta values from all posts of a Custom Post Type

I've got a CPT of Inventory and I'm trying to show a dropdown of all Mfrs. I've got the form and pre_get_posts function so that when a user selects a Mfr, the page refreshes and shows only the ...
revive's user avatar
  • 225
1 vote
0 answers
65 views

CPT Loop with ACF and passing ID between Loops

I have a staging site at: https://tozsdeforum.ethermedia.hu/ Near the top of the page, we have a "Kiemelt Hirek" section. In this section, there are five loops in play: IF (pos1 == true) {...
Pbalazs89's user avatar
  • 115
0 votes
1 answer
1k views

ACF: How can I publish values of ACF fields in a loop while using wp_query?

I'm using ACF to add fields to a custom post type. I've created an instance of WP_Query to set up a loop. Within the loop I can publish the standard fields using the_title() and the_content(). However,...
bob's user avatar
  • 249
0 votes
2 answers
824 views

Use ACF Category Image for all Taxonomy Archive Views

I’m wondering if you could help with some code I’m struggling with. I’ve got an ACF Image Field on the Post Category Taxonomy. I need to add it into the post loop so the category image shows up ...
Jason's user avatar
  • 45
0 votes
0 answers
309 views

Show custom post type event if current day using ACF

The following code pulls events from a custom post type that used Advanced Custom Fields, that is shown on an event listing page. It shows upcoming events as desired except when the event is on the ...
TechRemarker's user avatar
1 vote
1 answer
1k views

Multiple taxonomy And acf filter group by

I have a widget that must display my custom post type. I don't display title or content, but just the values of 3 custom fields (acf) : start date, end date and city. Here is my loop. I grab all the ...
blogob's user avatar
  • 137
0 votes
0 answers
282 views

Need to while loop and display contents in the subfield of a group field given by ACF

I need to display out the content inside the while loop and by taking the values that i have given in sub-field a group field created in ACF. field group name:career_details field group label:career ...
Pranavmtn's user avatar
0 votes
2 answers
99 views

Distribute Gallery Images Every nth in Loop

I have added an acf image gallery for archive terms and I would like to take those images and insert one image from the gallery every 3 posts in the term archive. This is what I have so far but I am ...
nahum's user avatar
  • 11
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
1 answer
1k views

Add Search and Filter functionality to custom loop

I have a custom post type and a page where I loop through them. I'm trying to implement the plugin Search and Filter to the page, so people can filter the custom posts. However, it does not work at ...
lastnoob's user avatar
  • 153
0 votes
1 answer
45 views

Some posts not displaying by taxonomy term

I've run into something very odd that I don't think I've ever seen before. I'm trying to query a custom-post-type and organize the results into groups by a custom taxonomy term. The post is Project ...
zfors's user avatar
  • 169
5 votes
1 answer
7k views

ACF Repeater loops and resets - where is the reset_rows() documentation? [closed]

I love ACF, its great for developers and it seems to have so much support. BUT... Why is reset_rows() not in the documentation? I created a function that can delete repeater rows at different times in ...
jonnyK's user avatar
  • 91
0 votes
1 answer
4k views

Loop through ACF taxonomies and output associated posts

I have a page template that loops through all existing post categories and outputs 5 associated posts for each category. I want to change this so it only outputs the categories I have selected in an ...
user108167's user avatar
0 votes
1 answer
2k views

ACF meta_key and meta_value break loop

I have a CPT with post type of 'recipe'. I have several ACF Advanced Custom Fields in the CPT. My loop WORKS correctly when it is written like this: <?php // args $args = array( 'numberposts'...
hommealone's user avatar
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
1 vote
2 answers
756 views

How to loop only categories without posts (+ show category featured image with acf) [closed]

I want to create on my blog a category loop with the featured image. But i don't know how i do that technical. You should only see a list of categories and click on them to get the category site. It'...
Mr Sag ich nicht's user avatar
0 votes
0 answers
83 views

How to create a category loop on my blog (ACF Plugin)

I want to create a category loop on my blog site, i already created some categories and uploaded featured images for them, but what's the next step? Thank you :)
Mr Sag ich nicht's user avatar
1 vote
1 answer
35 views

How do I go about looping through a advanced custom field on a particular page inside of another page

I have one page lets call it page-home.php and I also have a page called page-custom-field.php I want to have a section of the first page where it loops through page-custom-field.php page and display ...
Anders Kitson's user avatar
0 votes
0 answers
129 views

Wrapping an unknown amount of posts inside separate HTML Containers during WP_Query loop

I'm aware there are already answers regarding this question (Insert html after certain amount of posts?). But I haven't managed to find a solutions to my specific problem. The post linked above rely's ...
Aaron McGuire's user avatar
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
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
1 vote
1 answer
118 views

Loop through custom fields with similar label / common chars in label

I created several custom fields for my custom post type "books" There is a checkbox for languages. Whenever a language gets checked, several custom fields for that language get added (i.e. title, ...
sonja's user avatar
  • 159
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
0 votes
2 answers
3k views

How do I show the post title if an advanced custom field hasn't been used?

I've got an archive page for to display custom post types. Within the WP_Query that displays the custom posts types I want to display an ACF (Advanced Custom Field) or, if the user hasn't filled out ...
Andy's user avatar
  • 11
0 votes
2 answers
1k views

get custom post type value in header.php [closed]

I am using the ACF plugin for custom posts types and am fairly new to using it. I have a field called "app_url" that is a url that I need to include as a link in my header.php file so it is on all ...
jessica mele's user avatar
0 votes
1 answer
1k views

Loop to display ONLY custom taxonomy parent information [closed]

I'm looking to display only the top level categories from a custom post type taxonomy I've created... product-category. I'm hoping to pull the following data into a loop: Category title (the_title())...
Jake Punton's user avatar
0 votes
1 answer
777 views

Expecting statement error from php loop using ACF plugin

I feel like I've gone over my php loop structure multiple times but I can't figure out what I'm doing wrong. The file is counted as invalid by PHPstorm and won't run properly. Here's the code: while (...
Aslan French's user avatar
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
1 answer
8k views

ACF - add a group inside a repeater [closed]

I m using ACF, where I have a group. Inside that group I have a repeater. All works fine until: I add a group inside that repeat. I don't manage to call the field from that group inside the ...
thibaultlgd's user avatar
2 votes
0 answers
1k views

How to use max and min values of custom fields

How to use max and min values of custom fields (created via ACF, repeater type)? For axample, I've custom post type 'auto' and there are a lot of models. Each post(model) has few values of price (...
Влад's user avatar
0 votes
2 answers
3k views

Custom post type showing same Post on all Pages

Have a custom post type, where each post is a gallery, and each has an Advanced Custom Fields Gallery field that has say 5-20 images each. Also have a custom post type post template as seen below (...
TechRemarker's user avatar
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
1k views

ul list with only as many li's as filled custom fields

I have a slider that contains li's with images. The first 3 images are required, but the user should be able to add as many as 20. I think I have to create a ul with actually 20 li's, the li's after ...
Sergi's user avatar
  • 260
1 vote
1 answer
1k views

Using an ACF field from a page within a post loop?

I have a page set up with custom fields using Advanced Custom Fields. One of the fields is a text field for specifying the text for a read more button. Within the page template I have a post query to ...
user13286's user avatar
  • 227
-1 votes
1 answer
2k views

Output ACF field dynamicaly within a taxonomy loop [closed]

So I have this block that loops over my taxonomies and loads a template file to display each one of them while in it: <?php $collections = get_terms( 'resource-collection', array( 'orderby' ...
Diogo's user avatar
  • 21
1 vote
1 answer
1k views

Excluding pages in WP_query using ACF

I have a custom loop for showing child pages of the current page, but I'd like to allow the WP user to enter page IDs to be excluded from the loop, using Advanced Custom Fields. My current loop is as ...
Cintia's user avatar
  • 39
0 votes
1 answer
617 views

Counting number of images from loop

Im currently showing some data from a loop and loading a template: <?php $index = 0; if ( have_rows('sections', get_option('page_for_posts') ) ) : while ( have_rows('sections', get_option('...
user1231561's user avatar
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
0 votes
1 answer
63 views

Wordpress Request Post All Post ID in a Loop? [closed]

I would like to ask if there's a way on WordPress to get fetch all of the page's Field?... I am using a Advance Custom Field Plugin and would like to fetch data's from fields inputted over those ...
Jan JVOS's user avatar
0 votes
2 answers
672 views

How to display post list in a table layout (multiple queries in single loop)

I am setting up an events page for my website. This page is using a loop to display a list of acts performing at different venues month-by-month. When a viewer comes to the page, they use a simple ...
Jordan Rogers's user avatar