Hi,
Have you tried to change following radio boxes (attached image) and retest?
Choosing the “Image URL” radio box should give you the image path.
You can also get the field values if you have chosen other meta boxes. I recommend you to read documantions.
Sorry if I got you wrong,
Regards,
Hi @BrentRansom,
Have you tried to disable other plugins or even changed the theme to see if the problem still exist?
Regards,
Hi,
About your other problem check the following link: http://wordpress.stackexchange.com/questions/42743/the-excerpt-and-shortcodes
Regards,
Hi,
You can export your settings in both XML and PHP. Create your fields on your developement area and export them and add them in your functions file.
The export link is the second submenu in custom fields menu.
It is so clear and documantation is available in that page.
Regards,
Hi @slash_1968
This is possible both with this plugin and default wordpress theme customizer
You should add following codes before the loop. The 1st example is for theme customizer and the 2nd is for this plugin.
<?php
$category_slug = get_theme_mod( 'your_field_id' );
query_posts( array ( 'category_name' => $category_slug ) );
?>
———
<?php
$category_slug = get_field( 'your_field_id' );
query_posts( array ( 'category_name' => $category_slug ) );
?>
Hi @willthemoor
I do not think it is possible with checkboxes by default, but you can do that with radio boxes.
I hope that helps,
Hi,
As far as I’ve understood, you need to get all the key and value of a field group in an array, for that you did the right thing by using get_field_object()
. For example, you can print_r('$description')
to see whole array and then get the value that you want like: $description['value']['url']
I hope I have understood you correctly,
Hi,
You can use the following codes as well,
<?php
$posts = get_posts(array(
'numberposts' => 2,
'post_type' => 'ctas',
'meta_key' => 'cta_location',
'meta_value' => 'about'
));
?>
foreach ( $posts as $post ) : setup_postdata( $post ); ?>
<div class="widget">
<?php the_content(); ?>
</div>
<?php endforeach; wp_reset_postdata();?>
I hope that helps,
Hi,
Please provide an example, it that way we can help you better,
Regards
Hi,
It should works.
You can also choose Image Object radio box then get the value with get_field_object('image')
. It retrives an array with almost anything you need. For example you can get image url like below:
$fields = get_field_object('image');
<img src="<?php echo $fields['value']['url']; ?>" alt="<?php echo $fields['value']['alt']; ?>" />
For seeing the whole array use <pre><?php print_r(get_field_object('image'))?></pre>
somewhere in the loop.
I hope that helps,
Hi,
You are getting the value of your custom field (jobs_kategorie) outside of loop so you should provide the post id as well in get_field() like get_field('category-name', 64)
.
For your case I recommend you to add another custom field for post id.
$wp_query = new WP_Query (array('post_type' => 'stellenangebote', 'category_name' => get_field('jobs_kategorie', 'jobs_post_id') ));
?>
Regards,
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.