Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author jeffrey-wp

    (@jeffrey-wp)

    Yes, you can see al media attached to a category in the media library of WordPress.

    Thread Starter md84

    (@md84)

    This is what I needed! Great plugin ??

    $args = array(
    	post_type => attachment,
    	numberposts => -1,
    	category => $cat_ID
    );
    $attachments = get_posts($args);
    if($attachments){
    	foreach($attachments as $attachment){
    		$image_attributes = wp_get_attachment_image_src($attachment->ID, 'full');
    		echo '<img src="'.$image_attributes[0].'">';
    	}
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Retrieving media assigned to category not attached to post’ is closed to new replies.