Last active
December 13, 2015 18:18
-
-
Save origamirobot/4954022 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//OptionTree Stuff | |
$eventCat = ot_get_option('event_cat'); | |
?> | |
<!--FILTER--> | |
<div id="filter" class="blackBar"> | |
<ul> | |
<li><a class="active" href="#"><?php echo get_cat_name($eventCat); ?></a></li> | |
<?php | |
$cats = wp_list_categories('child_of='.$eventCat.'&title_li=&echo=0'); | |
if (!strpos($cats,'No categories') ){ | |
echo $cats; | |
} | |
?> | |
</ul> | |
<!--FILTER--> | |
<div id="filter" class="blackBar"> | |
<ul> | |
<li><a class="active" href="#">All Neighborhoods</a></li> | |
<?php | |
// NOT TOTALLY SURE ABOUT THIS SPOT HERE | |
$hoods = wp_list_tags('child_of='.$eventCat.'&title_li=&echo=0'); | |
if (!strpos($hoods, 'No tags') ){ | |
echo $hoods; | |
} | |
?> | |
</ul> | |
</div> | |
<!--UL DATE LIST--> | |
<ul id="dateList"> | |
<?php | |
$prev_month = ''; | |
$prev_year = ''; | |
$temp = $wp_query; | |
$wp_query= null; | |
$wp_query = new WP_Query(); | |
$wp_query->query('order=ASC&cat='.$eventCat.'&showposts=200'.'&paged='.$paged); | |
while ($wp_query->have_posts()) : $wp_query->the_post(); | |
if(get_the_time('M') != $prev_month || get_the_time('Y') != $prev_year){ | |
?> | |
<li class="box monthYear" id="<?php echo get_the_time('M'); echo get_the_time('y'); ?>"> | |
<a class="dateLink" href="<?php echo home_url(); ?>/<?php echo get_the_time('Y/m'); ?>"> | |
<span><?php echo get_the_time('M'); ?></span><br /> | |
<?php echo get_the_time('Y'); ?> | |
</a> | |
</li> | |
<?php } ?> | |
<li class="box postEvent<?php foreach((get_the_category()) as $category) {echo ' '.$category->category_nicename.'';}?>"> | |
<a href="<?php the_permalink(); ?>"> | |
<span class="theDay"><?php echo get_the_time('d'); ?></span><br /> | |
<p class="theTitle"> | |
<span><?php echo get_the_time('D @ g:i a'); ?></span><br /> | |
<?php echo the_title(); ?> | |
</p> | |
</a> | |
</li> | |
<?php | |
$prev_month = get_the_time('M'); | |
$prev_year = get_the_time('Y'); | |
endwhile; | |
$wp_query = null; | |
$wp_query = $temp;?> | |
<li class="box" id="theEnd"><?php _e("See you in June!");?></li> | |
</ul><!--END DATE LIST--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment