-
Notifications
You must be signed in to change notification settings - Fork 1
/
page-sponsors.php
40 lines (35 loc) · 1.01 KB
/
page-sponsors.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
/*
Template Name: Page w/ Sponsors
*/
?>
<?php get_header(); ?>
<?php get_template_part('loop', 'page'); ?>
<?php
$details_args = array(
'post_type' => 'sponsors',
'orderby' => 'title',
'order' => 'ASC',
'posts_per_page' => -1,
);
$details_query = new WP_Query($details_args);
?>
<?php /* Start loop */ ?>
<?php $i = 0; ?>
<?php while ($details_query->have_posts()) : $details_query->the_post(); ?>
<?php if ($i%3 == 0 && $i != 0) { echo '</ul>'; } ?>
<?php if ($i%3 == 0) { echo '<ul class="row clearfix sponsorRow">'; } ?>
<li class="four columns">
<a href="<?php echo get_post_meta($post->ID, '_tedxhongyadong_sponsor_url_value', true) ?>" target="_blank" title="<?php the_title(); ?>" class="sponsorLink">
<?php the_post_thumbnail('sponsor_logo', array(
'alt' => ''.get_the_title().'',
'title' => ''.get_the_title().''
)); ?>
</a>
</li>
<?php
$i++;
endwhile; // End the loop
echo '</ul>';
?>
<?php get_footer(); ?>