Advertisement
cesarnascimento

Untitled

Nov 28th, 2018
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.23 KB | None | 0 0
  1. <?php
  2.    
  3. // title bar options
  4. $search_for = 'blog';
  5. $sidebar = true;
  6. if( isset( $_GET['post_type'] ) && $_GET['post_type'] === 'product' ) {
  7.     $search_for = 'shop';
  8.     $sidebar = false;
  9. }
  10. $title_banner = cs_get_option( 'blog-title-fieldset' );
  11. $display_title_bar = ( isset( $title_banner['blog-title-bar'] ) ) ? $title_banner['blog-title-bar'] : false;
  12.  
  13. get_header();
  14. ?>
  15.    
  16. <?php
  17. /**
  18.  * STYLISTA Title Banner
  19.  */
  20.  
  21. stylista_title_banner($search_for);
  22.  
  23. ?>
  24. <div class="row">
  25. <div class="col-md-8">
  26. <main class="main primary-padding">
  27.     <section class="blog-block">
  28.         <div class="container">
  29.             <?php
  30.             if( $search_for === 'shop' ):
  31.                 ?>
  32.                 <div class="row">
  33.                     <div class="col-sm-8 col-md-8 col-xs-8">
  34.                         <div class="blog-list-wrap">
  35.                             <ul class="products">
  36.                                 <?php if( function_exists( 'wc_get_template_part' ) ): ?>
  37.                                      wc_get_template_part( 'content', 'product' );
  38.                                 <?php endif; ?>
  39.                             </ul>
  40.                         </div>
  41.                     </div>
  42.                  <div class="col-md-3" style="margin-left: 95px;">
  43.                     <?php echo do_shortcode("[woof]"); ?>
  44.                  </div>
  45.                </div>
  46.             <?php  else: ?>
  47.                 <?php if( have_posts() ): ?>
  48.                     <?php get_template_part( 'partials/post/archive', 'classic' ); ?>
  49.                 <?php else: ?>
  50.                     <p><?php esc_html_e( 'Your search did not return any results.Try Searching Other Keywords.', 'stylista' ); ?></p>
  51.                     <div class="search-form"><?php get_search_form();?></div>
  52.                     <a href="<?php echo esc_url( home_url('/') ); ?>" class="home-url">
  53.                         <?php esc_html_e( 'Go back to Home', 'stylista' ); ?>
  54.                     </a>
  55.                 <?php endif; ?>
  56.             <?php endif; ?>
  57.         </div>
  58.     </section>
  59.     <!--blog-->
  60. </main>
  61. </div>
  62. <div class="col-md-3" style="margin-left: 95px;">
  63. <?php echo do_shortcode("[woof]"); ?>
  64. </div>
  65. </div>
  66. <!-- /.main-->
  67.  
  68. <?php
  69. get_footer();
  70. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement