Thanks @hube2 I saw that post but wasn’t sure it was related or not… guess so. This is my first time working with JSON so wasn’t sure. I’ll submit a ticket.
Thanks John! That did it.
Thanks again John. My initial question was answered, but if you’re still willing…
The results are sorted alpha by Title (default) I’d like to sort the results by yet another ACF which is a date/time field = ‘start_date_time’
(These are a CPT called “Events” and each event has a start / end date & time. I’d like to sort the results in order of the date/time that each Event takes place)
I don’t know where to put ‘orderby’ values, etc. Not a biggie, but gosh I wish I knew more PHP than novice level 🙂
Awesome, thanks John! That worked. (Though a comma was needed after the ‘key’ line)
The Toggle was actually a radio button with “Yes” and “No”, but I get it with true/false. The final query arg ended up being:
function bem_query_only_published_posts( $args, $field, $post_id ) {
$args['post_status'] = array( 'publish' );
$args['meta_query'] = array(
array(
'key' => 'acf_toggle_field_123',
'value' => 'Yes'
)
);
return $args;
}
add_filter( 'acf/fields/post_object/query', 'bem_query_only_published_posts', 10, 3 );
I’ve done some more searching and found this “WordPress function to convert address to Lat/Long”
https://gist.github.com/bradp/4999343
But I’m only enough of a programmer to realize “this could possibly be used.” But that’s the extent of my programming knowledge 🙂
I solved this 5min after posting it…
<?php $form_id = get_field('event_registration_form_id'); ?>
<?php gravity_form( $form_id , false, false, false, '', true, 12 ); ?>
Not sure that is the cleanest or ‘proper’ way but it works 🙂 If there is a better way to do it, let me know. Again, php noob here.
Perfect! That worked exactly as needed.
https://www.screencast.com/t/BwK6RAvb48
https://www.screencast.com/t/T7sU2jf7
Thank you very much!
I am stuck in a similar scenario. I need to embed vimeo livestream sessions (which are iframes) into CPT’s built with ACF Fields. The Vimeo code is:
<div style="padding:56.25% 0 0 0;position:relative;"><iframe src="https://vimeo.com/event/XXXXXX/embed" frameborder="0" allow="autoplay; fullscreen" allowfullscreen style="position:absolute;top:0;left:0;width:100%;height:100%;"></iframe></div>
And I’d like to have the ACF as only the src URL which is https://vimeo.com/event/XXXXXX/embed
@hube2 Do you have resources/links on how to build the function/shortcode you mentioned?
I’m having same issue and found this post.
@piyush-a I have tried the ACF Code Field plugin but it’s also not working. I have it installed, configured and my custom embed field is showing up on my CPT entry. But Elementor cannot “see” the field in the key dropdown. I’ve tried all different variations of the editor type (HTML Mixed, HTML, etc.) Would you mind sharing how you got this to work?
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.