Advertisement
catwingz

search.php > tag.php

Dec 16th, 2012
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.91 KB | None | 0 0
  1. <?php get_header() ;?>
  2.  
  3. <?php if (($var['sidebars'] == 'left' || $var['sidebars'] == 'left and right') && ($var['sidebarGroup'] != 'right') ) { get_sidebar('left'); if($var['sidebars'] == 'left and right' && ($var['sidebarGroup'] == 'left')) {get_sidebar('right'); } } ?>
  4.  
  5. <div id="main" class="equalht">
  6.  
  7. <div class="main_wrapper">
  8. <?php if ($var['k9-vision'] == 'on') { ?> <div class="mvtext" style="height:400px">Content Area (<?php echo $var['main_width']; ?>px wide)</div><div class="clear" style="height:280px"></div><?php } else { ?>
  9.  
  10. <?php k9_get_hanger('content/before/'); ?>
  11.  
  12. <?php if (have_posts()) : ?>
  13.  
  14. <h2><?php echo $var['search_text']; ?></h2>
  15. <?php if($var['show_search_term'] == 'on') : ?><h3>Searched Term: <em><?php echo $_GET['s']; ?></em></h3><?php endif; ?>
  16.  
  17. <?php if(function_exists('wp_paginate')) wp_paginate(); else posts_nav_link(); ?>
  18.  
  19. <div id="search-results">
  20.  
  21. <?php while (have_posts()) : the_post(); ?>
  22.  
  23. <div class="tag_cloud">
  24. /* START custom code to format the post title and images to link to the full post. */
  25. echo '</br>';
  26. ?>
  27. <a href="<?php echo get_permalink(); ?>"><?php the_excerpt() ?></a>
  28. <?php
  29. $current_permalink = get_permalink();
  30. echo '</br>';
  31. $args = array(
  32. 'post_type' => 'attachment',
  33. 'numberposts' => -1,
  34. 'post_status' => null,
  35. 'post_parent' => $post->ID
  36. );
  37. $attachments = get_posts( $args );
  38. if ( $attachments ) {
  39. foreach ( $attachments as $attachment ) {
  40. echo '<ul>';
  41. ?>
  42. <a href="<?php echo $current_permalink ?>"><?php echo wp_get_attachment_image( $attachment->ID, 'thumbnail' ); ?> </a>
  43. <?php
  44. echo '</p></ul>';
  45. }
  46. }
  47. echo '</br></br>';
  48. /** get_template_part( 'content', get_post_format() ); */
  49. /* END custom code to format the post title and images to link to the full post. */
  50. </div>
  51.  
  52. <?php endwhile; ?>
  53. <div class="clear"></div>
  54. </div>
  55.  
  56. <?php if(function_exists('wp_paginate')) wp_paginate(); else posts_nav_link(); ?>
  57.  
  58. <?php else : ?>
  59.  
  60. <h2>No posts found. Try a different search?</h2>
  61.  
  62. <?php endif; } ?>
  63.  
  64. <?php k9_get_hanger('content/after/'); ?>
  65.  
  66. </div>
  67.  
  68. </div>
  69.  
  70. <?php if (($var['sidebars'] == 'right' || $var['sidebars'] == 'left and right') && ($var['sidebarGroup'] != 'left') ) { if($var['sidebars'] == 'left and right' && ($var['sidebarGroup'] == 'right')) {get_sidebar('left'); } get_sidebar('right'); } ?>
  71.  
  72. <div class="clear"></div>
  73.  
  74. <?php get_footer();?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement