Permalink
Browse files

added query resets

  • Loading branch information...
1 parent 81f4e8e commit 6a42f9be2f5ff968303667a7273bcb57a5507365 @ahmednuaman committed Jan 9, 2012
@@ -360,6 +360,11 @@ function workshops_get_dates($n=true)
</div>
</div>
<?php
+
+ if ( $n )
+ {
+ wp_reset_query();
+ }
}
function workshops_handle_shortcode_bloginfo($a)
@@ -11,5 +11,8 @@
while ( have_posts() ): ?>
<?php workshops_get_dates( false ); ?>
-<?php endwhile; ?>
-<?php get_footer(); ?>
+<?php endwhile;
+
+wp_reset_query();
+
+get_footer(); ?>
@@ -2,16 +2,21 @@
/*
Template Name: Speakers
*/
-?>
-<?php get_header(); ?>
-<?php query_posts( 'post_type=' . $workshops_name_speakers . '&orderby=title&order=ASC' ); ?>
-<?php while ( have_posts() ): the_post(); ?>
+
+get_header();
+
+query_posts( 'post_type=' . $workshops_name_speakers . '&orderby=title&order=ASC' );
+
+while ( have_posts() ): the_post(); ?>
<div class="section speaker">
<div class="thumbnail"></div>
<h2><?php the_title(); ?></h2>
<?php the_content(); ?>
<?php $t = get_post_meta( get_the_ID(), $workshops_prefix . 'twitter', true ); ?>
<a href="https://twitter.com/<?php echo $t; ?>" class="twitter-follow-button" data-show-count="false" data-size="large" data-show-count="false" data-width="185px">Follow @<?php echo $t; ?></a>
</div>
-<?php endwhile; ?>
-<?php get_footer(); ?>
+<?php endwhile;
+
+wp_reset_query();
+
+get_footer(); ?>

0 comments on commit 6a42f9b

Please sign in to comment.