document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <?php
  2. get_header();
  3.  
  4. if (have_posts()): ?>
  5. <?php
  6. while (have_posts()) : the_post(); ?>
  7. <li class="postWrapper" id="post-<?php the_ID(); ?>">
  8.  
  9. <h3 class="entry-title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
  10. <div id="postdata">
  11. <div class="search-content">
  12. <?php the_excerpt(__('<p>Read More ></p>')); ?>
  13. </div>
  14.  
  15. <div class="entry-meta">
  16. <?php
  17. $view_in_browser = '<a class="google-viewer" href="http://docs.google.com/viewer?url='.$attachment_url.'">View document in browser</a>';
  18. $download = '<a class="download" href="'.$attachment_url.'">Download PDF</a>';
  19. echo $view_in_browser . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . $download;
  20. ?>
  21. </div>
  22.  
  23. </div>
  24. <hr />
  25. </li>
  26. <?php endwhile; ?>
  27.  
  28. <?php
  29. global $wp_rewrite;
  30. $wp_query->query_vars['paged'] > 1 ? $current = $wp_query->query_vars['paged'] : $current = 1;
  31.  
  32. $pagination = array(
  33. 'base' => @add_query_arg('page','%#%'),
  34. 'format' => '',
  35. 'total' => $wp_query->max_num_pages,
  36. 'current' => $current,
  37. 'show_all' => true,
  38. 'type' => 'plain',
  39. );
  40.  
  41. if( $wp_rewrite->using_permalinks() )
  42. $pagination['base'] = user_trailingslashit( trailingslashit( remove_query_arg('s',get_pagenum_link(1) ) ) . 'page/%#%/', 'paged');
  43.  
  44. if( !empty($wp_query->query_vars['s']) )
  45. $pagination['add_args'] = array('s'=>get_query_var('s'));
  46.  
  47. echo paginate_links($pagination);
  48. ?>
  49.  
  50. <?php else: ?>
  51. <h3 style="text-align:center; font-weight:bold; color:#333;"><?php _e('Sorry, no posts matched your criteria.'); ?></h3>
  52. <p style="text-align:center">Please try Searching anohter term.</p>
  53. <?php
  54. endif;
  55. ?>
  56. <?php if (will_paginate()): ?>
  57. <?php endif; ?>
  58. <?php
  59. get_footer();
  60. ?>
');