Advertisement
Adam_Wadsworth

Infinity Scroll Looping Bug

Jan 10th, 2012
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. <?php
  2. /**
  3. * The template for displaying Category Archive pages.
  4. *
  5. * @package WordPress
  6. * @subpackage Twenty_Ten
  7. * @since Twenty Ten 1.0
  8. */
  9. ?>
  10. <?php get_header(); ?>
  11. <!-- This is the blog page -->
  12. <div class="blogwrapper">
  13. <!-- Categories Sidebar -->
  14. <div class="categories">
  15. <h2>Categories</h2>
  16. <ul>
  17. <?php wp_list_categories('orderby=name&title_li=&child_of=13'); ?>
  18. </ul>
  19. </div>
  20. <!-- Finished Categories Sidebar -->
  21.  
  22. <div class="blog">
  23. <div class="content" id="content">
  24. <div class="posts" id="posts">
  25. <?php $catname = wp_title('', false); ?>
  26. <?php query_posts("category_name=$catname"); ?>
  27. <?php $posts = get_posts("category_name=$catname"); foreach ($posts as $post) : start_wp(); ?>
  28.  
  29. <?php if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) : ?>
  30. <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?>
  31. <div class="post">
  32. <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" class="nolinkborder">
  33. <img src="<?php echo $image[0]; ?>">
  34. </a>
  35. </div>
  36. <?php else: ?>
  37. <?php endif;?>
  38. <?php endforeach; ?>
  39. <div class="pagination">
  40. <?php previous_posts_link('Newer &raquo;'); ?>
  41. <?php next_posts_link('&laquo; Older'); ?>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. <!-- Finished Blog Page-->
  48. </div>
  49. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement