i have some problem in saving pages with custom field in 5.1.5
use get_field_object()
http://www.advancedcustomfields.com/resources/get_field_object/
Hi @WPDragon,
first, you must choose a lightbox plugin. for example Magnific Popup is a good choice:
http://dimsemenov.com/plugins/magnific-popup/
then use “Modal popup” structure for output
use embed field with repeater field
this field can be useful:
https://github.com/soderlind/acf-field-date-time-picker
other ACF 5 Add-ons:
https://github.com/reyhoun/awesome-acf
hi @Johnson
you can download ACF Pro from your account page:
http://www.advancedcustomfields.com/my-account/
for rating plugin see this:
https://github.com/kevdotbadger/acf-star-rating
for see another ACF Pro add-ons:
https://github.com/reyhoun/awesome-acf
are you try it with [url] parameter?
<style>
<?php
$residential_images = get_field('residential_gallery',29);
$residential_image_end = end($residential_images);
reset($residential_images);
?>
.scaleme#residential{
background-image:url(<?php echo $residential_image_end[url]; ?>);
}
</style>
for test it:
print_r($residential_image_end);
try this:
<?php
$residential_images = get_field('residential_gallery',29);
$residential_image_end = end($residential_images);
reset($residential_images);
?>
tnx @mathieu
try this :
$main_field = get_field('beelden');
$first_img = $main_field[0]['beelden']['url'];
@mathieu Is possible to give output print_r(get_field('beelden'));
?
you can use print_r for view repeater field array and then use first row of array
<?php print_r(get_field('beelden')); ?>
for example:
<?php
$repeater = get_field(‘beelden’);
$first_img = $repeater[0][‘img’];
?>
for better understand, you create a page like sitename.com/artist-archive and in this page a select field with project post?
Opportunity to share a screenshot to explain better there?
tnx
you can you relation field value for filter query, use post__in parameter in query
this plugin can be only 2 option for get list:
– get from a repeater field created in option page (ACF Pro)
– get from a post (single post ID)
i read again your problem, this field doesn’t for you.
you can create a small query like relationship field and then create you select list. something like this:
<?php $args = array(
'posts_per_page' => 5,
'offset' => 0,
'category' => '',
'orderby' => 'post_date',
'order' => 'DESC',
'include' => '',
'exclude' => '',
'meta_key' => '',
'meta_value' => '',
'post_type' => 'post',
'post_mime_type' => '',
'post_parent' => '',
'post_status' => 'publish',
'suppress_filters' => true ); ?>
<?php $posts_array = get_posts( $args ); ?>
<select>
<?php foreach ( $dynamicposts as $post ) : setup_postdata( $post ); ?>
<option value="<?php echo get_permalink(); ?>"><?php echo get_permalink(); ?></option>
<?php endforeach; ?>
</select>
<?php wp_reset_postdata(); ?>
Hi @zkingdesign,
we have create number of acf fields… i think this field can be helpful for you:
https://github.com/reyhoun/acf-subfield-chooser
this field use of the native WP oEmbed functionality:
https://codex.wordpress.org/Embeds
must of time this is a normal problem in local
+1 for import/export for option pages
We have the same problem 🙁
tnx a lot @Hube2
for example some field type is true/false, this field type very important and no need to check value. i think @elliot must fix this problem specially for Options Page Premium plugin.
I still can not find a solution to this problem, but I think use update_field function with a php loop in export file of fields can help me for now… any suggestion?
tnx @hu@Hube2 for reply,
but any better solution for this? like create a function to run all options page and save theme. for now we are many field and create a default value for each one? not a good idea
Thanks @elliot
Thanks @elliot, this solved my problem but create another question! 😀
if my field has more than one option for saving, what should i do in this situation?
Thanks
Navid
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.