Advertisement
Guest User

loop.php

a guest
Apr 3rd, 2014
85
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.12 KB | None
  1. <?php
  2. /**
  3. * The loop that displays posts.
  4. *
  5. */
  6.  
  7. ?>
  8.  
  9.  
  10.  
  11. <?php /* If there are no posts to display */ ?>
  12. <?php if ( ! have_posts() ) : ?>
  13. <div id="post-0" class="post error404 not-found">
  14. <h1 class="entry-title"><?php _e( 'Not Found', 'localize' ); ?></h1>
  15. <div class="entry-content">
  16. <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'localize' ); ?></p>
  17. <?php get_search_form(); ?>
  18. </div><!-- .entry-content -->
  19. </div><!-- #post-0 -->
  20. <?php endif; ?>
  21.  
  22. <?php
  23. /* Start the Loop.
  24. *
  25. *
  26. * Without further ado, the loop:
  27. */ ?>
  28. <?php while ( have_posts() ) : the_post(); ?>
  29.  
  30.  
  31. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  32.  
  33. <?php if ( !is_search() ) { ?>
  34. <h3 class="entry-title excpts vfont" style="margin: 0px;"><?php the_title(); ?></h3>
  35. <div class="vmeta smallfont">
  36. <?php ntl_posted_on(); ?><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' )); ?>"><?php echo get_the_author(); ?></a>
  37. </div>
  38. <?php
  39. $pphoto = '';
  40. $pphoto = get_the_post_thumbnail($post->ID, 'imlink');
  41. if ($pphoto) {
  42. ?>
  43.  
  44. <div class="excpt">
  45. <?php the_excerpt(); ?>
  46.  
  47. </div>
  48. <div class="menu-content" style="width: 286px; position: relative;">
  49. <div class="mencontent">
  50. <div class="imgblock" ><div class="imlk imgoverlink6 menimg">
  51. <?php the_post_thumbnail('imlink'); ?>
  52. <a href="<?php the_permalink(); ?>"><span class="imgblockover imgoverlink6">&nbsp;</span></a>
  53. </div></div>
  54. <div class="ctime clear smallfont">
  55. <?php the_time('j') ?>
  56. <?php the_time('M') ?>
  57. </div>
  58. </div>
  59. </div>
  60. <?php } else { ?>
  61. <?php the_excerpt(); ?>
  62. <?php } ?>
  63.  
  64. <?php } else { ?>
  65. <div class="foodmenu searchresult">
  66. <h2 class="entry-title vfont excpts"><?php the_title(); ?></h2>
  67. <?php the_excerpt(); ?>
  68. <a href="<?php the_permalink(); ?>">Read More</a>
  69. <span class="clear"></span>
  70. </div>
  71. <?php } ?>
  72.  
  73. </div>
  74.  
  75. <?php comments_template( '', true ); ?>
  76.  
  77. <?php endwhile; ?>
Advertisement
RAW Paste Data Copied
Advertisement