Hi @Grégoire Noyelle,
Thanks for the feature request 🙂
Have a great day
Hi @NWTD,
Your code here never prints anything? I’m guessing you want to print $output to screen? In that case you must echo it, and it is not necessary to return anything.
If this is part of a function, are you sure youre printing the result on the page?
Cheers
Hi @tadywankenobi,
You could check to see if a required field is empty in the first post?
Eg if get_field(‘name’) is empty then do something, else something else
cheers
Hi @lsterling03,
The problem is that the same global variable is being used by both loops (inner and outer) so that when your inner loop breaks or ends, the outer loops pointer no longer points to the required field in the array.
AS stated above Nested Repeaters are not supported, and would require you to do some coding that is unfortunately, outside the scope of this support forum.
Cheers
Hi @kwoodall,
Without seeing your code, all I can suggest is setting a Vendors rating default value to zero, or to a number outside the scope of your rating system (eg -1 or 11 could represent unrated on a scale of 0 to 10, depending on where you want the unrated Vendors to appear)
You would then have a statement set up to print out “unrated” or something else suitable instead of the number.
If this doesnt help, feel free to post the code (in back ticks please) that has got closest to what you want, and we’ll see what we can do.
Cheers
Hi @lkraav,
CPT do have changeable conditions for being shown? When you go to the ACF Add/Edit feild group page, it is below where you add the fields.
What you want, is to change the conditions to “Page” “is not equal to” “Child”
Let me know if this fixes your problem,
Cheers
Hi @Ionut Staicu,
You could try creating a field group that contains all the common fields you need to reuse, then have it appear when the post is a certain taxonomy or category. As you can select multiple categories for a post, you could then “mix n match” which fields you wanted for each post.
Let me know if this helps,
Cheers
Hi @kurdt_the_goat,
Sounds like this might be a JS error, can you please check your browser console?
Cheers
Hi @manonatelier,
Thanks for the clarification. I do not believe this is possible. I will raise a feature request for Elliot to take a look at for you.
Thanks for your patience. 🙂
Hi @lsterling03,
Looking at the code it does not look like nested repeaters are supported because both the has_sub_field
and get_sub_field
functions use the same ACF global $GLOBALS['acf_field']
.
Nesting them will cause unwanted side affects. So, your inner break is working correctly but pointer in the global will have moved to the end, thus exiting the outer loop too.
Hi @sixfootjames,
Just so you know. This is not Elliot, we are here to help him with his super popular plugin. 🙂
I would consider doing this using jQuery and AJAX. You could use ACF to generate your original select and a blank select.
And then write some generic PHP to accept an AJAX request with the selection and then return a data set to populate the second select.
IMO, this would make for a better UX.
Hi @kurdt_the_goat,
May I ask what version of ACF and WP you are using? Do you have any other plugins installed?
Cheers
Hi @csnodgr2,
When both post types are using the same product, what does Related-Product-1 return? A different product?
Cheers
Sorry @manonatelier, Im not exactly sure where you are talking about?
When you go to make a new post with custom fields? or when you are designing your fields? or some other time?
Cheers,
Is the drop down box an ACF selection?
If so, the currently selected element can be accessed by using
$wine = get_field('name-of-drop-down-box');
before defining $args
Cheers
Hi @dreamer
Thanks for the request!
Ive passed it on to Elliot
Hi @WPDragon
something like this
<p class="image_photographer">Image courtesy of: <a href="<?php the_field('photographer_url')?>"> <?php the_field('image_photographer') ?> </a></p>
where “photographer_url” is a text field
Cheers
Hi @vaktmester,
Thanks for taking the time to request a feature. I have added it to our report for Elliots attention. 🙂
Hi @danfloun,
Sorry, I assumed that you had already attempted to attach an click event to the image and it was not working.
This is not really in the scope of ACF support but I will do my best to help you out. On the page that you have the slider you will need to add some custom JavaScript that adds a click event to the image that will invoke the lightbox.
Without knowing how you have setup your slider or lightbox can’t really give you the exact code, but it will be something like this:
$(function() {
$('.slide-image-class').on('click', function() {
//Fire the lighbox code.
});
});
Hope this helps. 🙂
Hi @glennyboy,
That or the problem could reside in Rev Slider. 🙂
Can you please post any javascript errors showing in your browser developer tools console when you click the button?
Hi @shatilarefin,
Can you please wrap your code in backticks so it is formatted and easier to read.
I am not 100% sure what you are asking here but it sound like you want to be able to let your customers input their own data. This is not a simple change and you will need to be confident with PHP to achieve this functionality.
Here is a good place to start => http://www.advancedcustomfields.com/resources/getting-started/displaying-custom-field-values-in-your-theme/
Good luck. 🙂
Hi @Phillip,
Thanks for taking the time to investigate this issue and request a feature. I have added it to our report for Elliots attention.
Hi @likipe,
This might be a bug. If you wouldn’t mind, I’d like to get some more information from you:
What version of ACF and WP are you using?
Is there any other fields attached to the post (within, or outside the repeater field in question), and do they appear when editing?
Cheers
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.