Email me mike [at] thestizmedia.com
Let me login if possible 😉
Now we’re getting somewhere!
What is your field type? Are they choosing via radio buttons or select?
To get the value (not the name) of your radio/select, you just do it how I explained above:
echo '<div class="' . get_field('header_bullets_and_testimonials_colour') . '">';
Just make sure your field ‘Choices’ are setup to work as classes… so it would be:
class-one | Class One
class-two | Class Two
… as seen in the first image here: http://www.advancedcustomfields.com/resources/checkbox/
Now i’m totally confused. The field is just there so you can choose a div class name for the slider?
Without seeing what you’re actually doing, it’s hard to really help. This code is kind of confusing to me. echo ($show_size == "full") ? do_shortcode(nl2br(get_the_content(' '))) : get_the_excerpt();
Your above code doesn’t actually put the get_field() function into the content area, so you wouldn’t be seeing anything on the front end.
How about this… what is your field group location set to?
https://www.dropbox.com/s/16qavfmivxcyyrk/acf-field-group.png?dl=0
I’m still confused. The plugin shouldn’t matter.
What does this mean, “I have set the custom field type to display on the testimonials rotator section for the plugin.”
Where do you have the field group set to display in the admin? ie: Where are you putting in your field values and saving?
Try this with the first line.. you shouldn’t be getting the actual get_field code in the HTML
echo '<div class="' . get_field('header_bullets_and_testimonials_colour') . '">';
Are the custom fields on the ‘testimonial’ post type or somewhere else? Where are you adding the data? And on what page are you trying to display it?
I’m not exactly following what you are trying to do.
I’m looking to do this too.. also set a file size limit.
Im thinking the new validate filter in ACF Pro is the answer
http://www.advancedcustomfields.com/resources/acf-validate_value/
I’m going to dig in…
I need this too, for a very similar situation. 1 row needs to be set as the default in a repeater.
Anybody get it working?
This is currently working on a custom post type for me.
/**
* Front end creation of new download
* @author Mike Hemberger
* @link http://thestizmedia.com
* @uses Advanced Custom Fields Pro
*/
add_filter('acf/pre_save_post' , 'jivedig_newdownload_pre_save_post' );
function jivedig_newdownload_pre_save_post( $post_id ) {
// check if this is to be a new post
if( $post_id != 'new' ) {
return $post_id;
}
// Create a new post
$post = array(
'post_status' => 'publish',
'post_title' => $_POST['acf']['field_5483b32a04842'], // beat_title
'post_type' => 'download',
);
// insert the post
$post_id = wp_insert_post( $post );
// update $_POST['return']
$_POST['return'] = add_query_arg( array('post_id' => $post_id), $_POST['return'] );
// return the new ID
return $post_id;
}
Ugh, was this ever resolved? I’m trying everything here and still can’t get anything post_title related to work.
EDIT: I got it working a little after, turns out while I was copying the long field number it was including and extra number.. totally wasted an hour when the number was wrong the whole time.. glad it’s working now!
Just jumping in to confirm this is still a bug/issue in v5 ACF Pro.
I have multiple instances of acf_form() in different tabbed content areas via jquery-ui-tabs and the location field/group only works when it’s in the first tab.
It’s annoying, but i’m glad i found this thread.. I spent almost 2hrs trying to find out why it wasn’t working.
Anybody find a solution to this?
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.