Skip to main content
  Sunday, May 17 2015
  7 Replies
  2.7K Visits
  Subscribe
Hi, now I'm using ACF.
And I have problem I need to solve.
In media created folders with images, I want to somehow make choice for editors to add ALL images from selected category-folder. But ACF cant see categories generated by your plugin. Can you advice me anything? :)
V
8 years ago
*so I make select-field in ACF to output ID of wpmf-category, but I cant eject anything by this code

<?php 
$car_gallery = get_field('car-photofolder');
$args = array('category' => $car_gallery);
$postslist = get_posts( $args );
foreach ( $postslist as $post ) :
setup_postdata( $post ); ?>
<li>
<?php the_post_thumbnail('large'); ?>
<?php get_media_item() ?>123
</li>

<?php
endforeach;
wp_reset_postdata();
?>


What I'm doing wrong?
Near that code writed <?php the_field('car-photofolder'); ?> and I easely recieve ID of category, but get_posts dont work :(
V
8 years ago
<?php
$car_gallery = get_field('car-photofolder');
$args = array( 'category' => $car_gallery, 'order'=> 'desc', 'orderby' => 'date' );
$postslist = get_posts( $args );
foreach ( $postslist as $post ) :
setup_postdata( $post ); ?>
<li>
<?php the_post_thumbnail('large'); ?>
<?php get_media_item() ?>123
</li>

<?php
endforeach;
wp_reset_postdata();
?>
V
8 years ago
Something wrong with your parcing feature.
V
8 years ago
Something wrong with your parcing feature.
V
8 years ago
Something wrong with your parcing feature.
V
8 years ago
This dont work too.
T
Hi,

Thanks for contacting us here. I'm sorry this forum is only for pre-sale question.
Please post a ticket, we don't provide custom dev but the developer will take a look at that.

Cheers,
  • Page :
  • 1
There are no replies made for this post yet.