fbpx
  1. vanyatwo
  2. Feature ideas for WP Media Folder
  3. Sunday, May 17 2015
  4.  Subscribe via email
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? :)
Responses (7)
Accepted AnswerPending Moderation
*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 :(
Accepted AnswerPending Moderation
<?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();
?>
Accepted AnswerPending Moderation
Something wrong with your parcing feature.
Accepted AnswerPending Moderation
Something wrong with your parcing feature.
Accepted AnswerPending Moderation
Something wrong with your parcing feature.
Attachments (1)
Accepted AnswerPending Moderation
This dont work too.
Attachments (1)
Accepted AnswerPending Moderation
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.
Be one of the first to reply to this post!