Advertisement
Guest User

Untitled

a guest
Oct 13th, 2011
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.38 KB | None | 0 0
  1. <?php include ('header-posts.php'); ?>
  2. <div id="post">
  3. <div id="sidebar">
  4. Browse by Category
  5. <div id="catlist">
  6. <ul><li><?php wp_list_categories('title_li='); ?></li></ul>
  7. </div>
  8. Browse by Client
  9. <br><br>
  10. <select name="tag-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;">
  11. <option value="#">Select</option>
  12. <?php dropdown_tag_cloud('number=0&order=asc'); ?>
  13. </select>
  14. <br><br><br><br>
  15. <a href="#"><img src="<?php bloginfo('template_directory'); ?>/images/gotaproject.jpg" class="ro" /></a>
  16. </div>
  17.  
  18.  
  19. <div id="content">
  20.  
  21. <?php if (have_posts()) : ?>
  22. <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
  23. <?php /* If this is a category archive */ if (is_category()) { ?>
  24. <h3><?php single_cat_title(); ?></h3>
  25. <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
  26. <h3>Posts tagged <?php single_tag_title(); ?></h3>
  27. <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
  28. <h3>Archive: <?php the_time('F jS, Y'); ?></h3>
  29. <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
  30. <h3>Archive: <?php the_time('F, Y'); ?></h3>
  31. <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
  32. <h3>Archive: <?php the_time('Y'); ?></h3>
  33. <?php /* If this is an author archive */ } elseif (is_author()) { ?>
  34. <h3>Author Archive</h3>
  35. <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
  36. <h3>Blog Archives</h3>
  37. <?php } ?>
  38. <?php echo category_description(); ?>
  39.  
  40. <?php /* Start the Loop */ ?>
  41. <?php while ( have_posts() ) : the_post(); ?>
  42.  
  43. <div class="result">
  44. <div class="thumbnail">
  45. <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
  46. <div class="thumbtitle"><?php the_tags(); ?></div>
  47.  
  48. <?php //get thumnbnail (custom field) ?>
  49. <?php $image = get_post_meta($post->ID, 'thumbnail', true); ?>
  50. <img src="<?php echo $image; ?>" title="<?php the_title(); ?>" />
  51. <?php the_post_thumbnail(); ?>
  52.  
  53.  
  54. </a>
  55. </div>
  56. </div>
  57. <?php endwhile; ?>
  58.  
  59.  
  60. <?php else :
  61. if ( is_category() ) { // If this is a category archive
  62. printf("<h2 class='center'>Sorry, but there aren't any posts in the %s category yet.</ 2>", single_cat_title('',false));
  63. } else if ( is_date() ) { // If this is a date archive
  64. echo("<h2>Sorry, but there aren't any posts with this date.</h2>");
  65. } else if ( is_author() ) { // If this is a category archive
  66. $userdata = get_userdatabylogin(get_query_var('author_name'));
  67. printf("<h2 class='center'>Sorry, but there aren't any posts by %s yet.</h2>", $userdata->display_name);
  68. } else {
  69. echo("<h2 class='center'>No posts found.</h2>");
  70. }
  71. get_search_form();
  72. endif;
  73. ?>
  74.  
  75. </div>
  76.  
  77. <div id="nav">
  78. <div id="older"><?php previous_posts_link('&larr;') ?></div>
  79. <div id="newer"><?php next_posts_link('&rarr;') ?></div>
  80. </div>
  81.  
  82. </div>
  83.  
  84. <?php get_footer(); ?>
  85.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement