Advertisement
Guest User

search.php

a guest
May 7th, 2015
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. <?php
  2.  
  3. global $canvys;
  4.  
  5. /**
  6. * The search page template for our theme
  7. *
  8. * @package WordPress
  9. * @subpackage Canvys
  10. * @since Version 1.0
  11. */
  12.  
  13. // Call the header
  14. get_header();
  15.  
  16. $atts = array();
  17.  
  18. // Add the layout attribute
  19. $atts['sidebar_layout'] = cv_theme_setting( 'sidebar', 'search_layout', 'sidebar-right' );
  20.  
  21. // Set the global sidebar layout
  22. $canvys['current_sidebar_layout'] = $atts['sidebar_layout'];
  23.  
  24. // Add the sidebar setting, if applicable
  25. if ( 'no-sidebar' != $atts['sidebar_layout'] ) {
  26. $atts['sidebar'] = is_active_sidebar( 'search_sidebar' ) ? 'search_sidebar' : 'sidebar';
  27. }
  28.  
  29. // Grab the loop
  30. ob_start();
  31.  
  32. // grab the before search content
  33. get_template_part( 'inc/content/before-search' );
  34.  
  35. // grab the seach loop
  36. get_template_part( 'inc/loops/search' );
  37.  
  38. // Display pagination
  39. echo cv_pagination();
  40.  
  41. // grab all content
  42. $content = ob_get_clean();
  43.  
  44. // Display the page
  45. echo cv_content_section( $atts, $content );
  46.  
  47. // Call the footer
  48. get_footer();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement