Hi @sonnenschauer,
Please try out the following code as the basis of implementation which I’ve tested on my end:
<?php if ( have_rows( 'translation_translator' ) ) : ?>
<?php while ( have_rows( 'translation_translator' ) ) :
the_row(); ?>
<?php
$translator_language = get_sub_field( 'translator_language' );
if ( $translator_language ) :
$post = $translator_language;
setup_postdata( $post );
?>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php wp_reset_postdata(); ?>
<?php endif; ?>
<?php endwhile; ?>
<?php endif; ?>
I hope this helps!
Hi @angrypenguin88,
Glad to help! Now regarding your second question. When you get some time, could you confirm if it only affects fields with products marked out of stock but it shows up within product not marked out of stock?
Hi @angrypenguin88, glad you are making the progress. Kudos!
Looking at the code implementation, that it is the best approach since there is no function you can call all the fields within from within the field group as far I can tell since you would need to supply the select which can either be a field key as you’ve done or field name.
Please let me know if I can clarify more on the same!
Happy to help!
Hi @kikaweb, Please know that ACF stores data for custom field related to posts in the post_meta table. Therefore, using any migration tool should work just fine.
Personally, I’ve always preferred using wpallimport which has always worked well for me.
Hi @werle77, please know Field Groups and Fields registered via php will not be visible/editable via the “Edit Field Groups” admin page.
However, you should be able to convert an ACF Field Group from PHP to ACF-JSON and from there you will be able to edit them just fine.
With that said, I would recommend checking a look at this article on how Convert an ACF Field Group from PHP to ACF-JSON as the basis of the same.
When you get some time, can you please test it out and let me know how it goes?
Thanks!
Hi @angrypenguin88, I believe you can achieve this using the get_field_object() which will return the settings of a specific field.
Here is the link to the same: get_field_object()
When you get some time, could you please test it out and let me know how it goes?
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.