Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter tstrebeck

    (@tstrebeck)

    Has anyone heard from the developer? I even paid for support on his site 2 weeks ago and I have still yet to hear anything.

    Thread Starter tstrebeck

    (@tstrebeck)

    I figured this out. It’s quite a hack, but here it is if it can help someone down the road. I ended up pulling all the sermon series, querying the sermon series and the service type. Then listed the first sermon in each series, but in the loop I only actually get the sermon series image and link.

    <ul class="series-campus-list">
    <?php
    
    $custom_terms = get_terms('wpfc_sermon_series', 'wpfc_service_type');
    
    foreach($custom_terms as $custom_term) {
        wp_reset_query();
        $args = array(
    		'post_type' => 'wpfc_sermon',
    		'showposts'=>1,
            'tax_query' => array(
    		'relation' => 'AND',
                array(
                    'taxonomy' => 'wpfc_sermon_series',
                    'terms' => $custom_term->slug,
                    'field' => 'slug',
                ),
                array(
                    'taxonomy' => 'wpfc_service_type',
                    'terms' => array(''), // set location here
                    'field' => 'slug',
                ),
            ),
         );
    	$loop = new WP_Query($args);
    	if($loop->have_posts()) {
    		while($loop->have_posts()) : $loop->the_post();
    			echo '<li><a href="/sermons/series/' . $custom_term->slug .'">';
    			echo render_sermon_image('aspect-ratio');
    			echo '</a></li>';
    		endwhile;
         }
    }
    ?>
    </ul>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Display sermon_images from one Service Type’ is closed to new replies.