if( get_field('show_placing', 22) == 'Yes' ){ // HomePage ?>
include('partials/1st-place.php'); ?>
include('partials/2nd-place.php'); ?>
include('partials/3rd-place.php'); ?>
} ?>
$term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));
if (get_field('voting_enabled', 22) == 'No') {
$shortlist_1 = 'shortlist-1';
$shortlist_2 = 'shortlist-2';
$shortlist_3 = 'shortlist-3';
}
$args = array(
'post_type' => array('artwork'),
'posts_per_page' => -1,
'orderby' => 'menu_order',
'order' => 'ASC',
// 'post_status' => 'any',
'tax_query' => array(
'relation' => 'AND',
array(
'taxonomy' => 'schools',
'field' => 'slug',
'terms' => array($term->slug),
'include_children' => true,
'operator' => 'IN'
),
array(
'taxonomy' => 'artwork_options',
'field' => 'slug',
'terms' => array('1st-place','2nd-place', '3rd-place','allow-voting', 'shortlist-1', 'shortlist-2', 'shortlist-3' ),
'operator' => 'NOT IN'
),
),
);
$query = new WP_Query($args);
if ($query->have_posts()) {
while ($query->have_posts()) {
global $post;
$query->the_post();
$s_name = get_post_meta($post->ID, "student_name", true);
$media = get_post_meta($post->ID, "media", true);
$image_height = get_post_meta($post->ID, "image_height", true);
$s_name = get_post_meta($post->ID, "student_name", true);
$image_width = get_post_meta($post->ID, "image_width", true);
$featured_img_url = get_the_post_thumbnail_url($post->ID, 'full');
$new = str_replace(' ', '%20', $featured_img_url);
?>
the_title(); ?>
if ($s_name) { echo $s_name; } else { echo 'Student Name'; }; ?>
if ($media) { ?>
echo $media . ', ' . $image_height . 'cm x ' . $image_width . 'cm'; ?>
} else { ?>
Medium, 30cm X 50cm
} ?>
} ?>
} ?>