RUSSEL86

Search.php file code

Feb 3rd, 2016
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.22 KB | None | 0 0
  1. <?php get_header(); ?>
  2.         <style type="text/css">
  3.         .single_search_post {padding: 20px;margin-bottom: 10px; background: #fff;}
  4.         .single_search_post h1 {font-size: 20px;margin-bottom: 8px;}
  5.         .single_search_post h1 a {color: #27333d;}
  6.         .single_search_post h1 a:hover { color: #ea8f0c;}
  7.         h2.latest_frm_cat_title span {color: #ea8f0c}
  8.         .single_search {border: 1px solid #ddd;margin-bottom: 20px;padding: 15px }
  9.         .single_footer ul li a.popular_link_img{float: left;margin-right: 3%;width: 27%;}
  10.         .single_footer ul li a.popular_link_img img{width:100%;height:80px;}
  11.         .single_footer ul li a.popular_link{float:right;width: 70%;}
  12.         .archive_not_found {-moz-box-shadow: 1px 3px 9px;-webkit-box-shadow: 1px 3px 9px;box-shadow: 1px 3px 9px;font-size: 100px;padding: 10px 0 20px;text-align: center}
  13.         .archive_title {font-size: 31px;margin-left: 0px;padding: 15px 0;text-align: center;margin-bottom: 0;}
  14.         .sear_pagi{margin-bottom:10px}
  15.         </style>
  16.             <div class="search_results column">
  17.                 <h2 class="latest_frm_cat_title archive_title"><?php printf ( __ (
  18.                 'Search Results for : %s', 'brightpage' ), '<span>' .
  19.                 get_search_query() .  '</span>' ); ?> </h2>
  20.                
  21.                 <?php if (have_posts()) : ?>
  22.                
  23.                     <?php if(have_posts()) : ?>
  24.                     <?php while (have_posts()) : the_post(); ?>
  25.                         <div class="single_search_post">
  26.                             <h1><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h1>
  27.                             <div class="post_dt_tm fix"><span>Posted on <?php the_time('jS, F, Y') ?></span> <span>by <?php the_author_posts_link(); ?></span> - <span>Posted in: <?php the_category(', '); ?><?php the_taxonomies(array('template' => '% %l')); ?></span></div>
  28.                             <?php $post_content = get_the_content(); echo wp_trim_words($post_content, 60 );?>
  29.                             <a href="<?php the_permalink(); ?>" class="readmore_btn">Read More</a>
  30.                         </div>
  31.                        
  32.                     <?php endwhile; ?> 
  33.                     <?php endif; ?>
  34.                    
  35.             <!-- here is your pagnavicode -->
  36.            
  37.                 <?php else : ?>
  38.                 <h3 class="archive_not_found">404 not found </h3>
  39.                 <?php endif; ?>
  40.                
  41.                 <div class="sear_pagi fix">
  42.                     <?php if (function_exists('wp_pagenavi')) { wp_pagenavi(); } else { include('navigation.php'); } ?>
  43.                 </div> 
  44.        
  45.             </div>
  46.  
  47. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment