'portfolio', 'posts_per_page' => 9 );
$loop = new WP_Query( $args );
$img = $title = $width = $height = $posttags = '';
while ( $loop->have_posts() ) : $loop->the_post();
$width = get_field('width');
$height = get_field('height');
if( has_post_thumbnail() ){
$img = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'full' );
$img = !empty($img) ? $img[0] : '';
}
$posttags = get_the_tags();
if ($posttags) {
foreach($posttags as $tag) {
$tag = $tag->name;
}
}
$items .= "
";
endwhile;
$result = '
';
print $result;
?>