Advertisement
Guest User

Untitled

a guest
Sep 12th, 2019
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.96 KB | None | 0 0
  1. <?php
  2. if ( ! defined( ‘ABSPATH’ ) ) { exit; } // Exit if accessed directly
  3.  
  4. global $avia_config;
  5.  
  6. // check if we got posts to display:
  7. if (have_posts()) :
  8. $first = true;
  9.  
  10. $counterclass = “”;
  11. $post_loop_count = 1;
  12. $page = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;
  13. if($page > 1) $post_loop_count = ((int) ($page1) * (int) get_query_var(‘posts_per_page’)) +1;
  14. $blog_style = avia_get_option(‘blog_style’,’multi-big’);
  15.  
  16. while ( have_posts() ) : the_post();
  17.  
  18. $the_id = get_the_ID();
  19. $parity = $post_loop_count % 2 ? ‘odd’ : ‘even’;
  20. $last = count($wp_query->posts) == $post_loop_count ? ” post-entry-last ” : “”;
  21. $post_class = “post-entry-.$the_id.” post-loop-.$post_loop_count.” post-parity-.$parity.$last.” “.$blog_style;
  22. $post_format = get_post_format() ? get_post_format() : ‘standard’;
  23.  
  24. ?>
  25.  
  26. <article <?php post_class(‘post-entry post-entry-type-.$post_format . ” ” . $post_class . ” “); avia_markup_helper(array(‘context’ => ‘entry’)); ?>>
  27. <div class=”entry-content-wrapper clearfix <?php echo $post_format; ?>-content”>
  28.  
  29. <header class=”entry-content-header”>
  30. <?php
  31.  
  32. $searchimage = get_the_post_thumbnail( $the_id, ‘medium’ );
  33. echo{$searchimage} </span>;
  34.  
  35. $default_heading = ‘h2’;
  36. $args = array(
  37. ‘heading’ => $default_heading,
  38. ‘extra_class’ =>
  39. );
  40.  
  41. /**
  42. * @since 4.5.5
  43. * @return array
  44. */
  45. $args = apply_filters( ‘avf_customize_heading_settings’, $args, ‘loop_search’, array() );
  46.  
  47. $heading = ! empty( $args[‘heading’] ) ? $args[‘heading’] : $default_heading;
  48. $css = ! empty( $args[‘extra_class’] ) ? $args[‘extra_class’] :;
  49.  
  50. //echo the post title
  51. $markup = avia_markup_helper(array(‘context’ => ‘entry_title’,echo=>false));
  52.  
  53. ?>
  54.  
  55. </time>
  56. <?php
  57. if(get_post_type() !== “page”)
  58. {
  59. if ( get_comments_number() !=0|| comments_open() )
  60. {
  61. echo<span class=’text-sep’>/</span>;
  62. echo<span class=’comment-container minor-meta’>;
  63. comments_popup_link(0.__(‘Comments’,’avia_framework’),
  64. 1.__(‘Comment’ ,’avia_framework’),
  65. %.__(‘Comments’,’avia_framework’),’comments-link,
  66. “”.__(‘Comments Disabled’,’avia_framework’));
  67. echo</span>;
  68. }
  69. }
  70.  
  71. $taxonomies = get_object_taxonomies(get_post_type($the_id));
  72. $cats =;
  73. $excluded_taxonomies = array_merge( get_taxonomies( array(public=> false ) ), array(‘post_tag’,’post_format’) );
  74. $excluded_taxonomies = apply_filters(‘avf_exclude_taxonomies’, $excluded_taxonomies, get_post_type($the_id), $the_id);
  75.  
  76. if(!empty($taxonomies))
  77. {
  78. foreach($taxonomies as $taxonomy)
  79. {
  80. if(!in_array($taxonomy, $excluded_taxonomies))
  81. {
  82. $cats .= get_the_term_list($the_id, $taxonomy,,,,).’ ‘;
  83. }
  84. }
  85. }
  86.  
  87. if(!empty($cats))
  88. {
  89. echo<span class=’text-sep’>/</span>;
  90. echo<span class=”blog-categories minor-meta”>.__(‘in’,’avia_framework’).” “;
  91. echo $cats;
  92. echo</span>;
  93. }
  94.  
  95. ?>
  96.  
  97. </span>
  98. </header>
  99.  
  100. <?php
  101. echo<div class=”entry-content” ‘.avia_markup_helper(array(‘context’ => ‘entry_content’,echo=>false)).>;
  102. $excerpt = trim(get_the_excerpt());
  103. if(!empty($excerpt))
  104. {
  105. the_excerpt();
  106. }
  107. else
  108. {
  109. $excerpt = strip_shortcodes( get_the_content() );
  110. $excerpt = apply_filters(‘the_excerpt’, $excerpt);
  111. $excerpt = str_replace(]]>,]]>, $excerpt);
  112. echo $excerpt;
  113. }
  114. echo</div>;
  115. ?>
  116. </div>
  117.  
  118. <footer class=”entry-footer”></footer>
  119.  
  120. <?php do_action(‘ava_after_content’, $the_id, ‘loop-search’); ?>
  121. </article><!–end post-entry–>
  122.  
  123. <?php
  124.  
  125. $first = false;
  126. $post_loop_count++;
  127. if($post_loop_count >= 100) $counterclass = “nowidth”;
  128. endwhile;
  129. else:
  130.  
  131. ?>
  132.  
  133. <article class=”entry entry-content-wrapper clearfix” id=’search-fail’>
  134. <p class=”entry-content” <?php avia_markup_helper(array(‘context’ => ‘entry_content’)); ?>>
  135. <?php _e(‘Nothing Found’, ‘avia_framework’); ?><br/>
  136. <?php _e(‘Sorry, no posts matched your criteria. Please try another search’, ‘avia_framework’); ?>
  137. </p>
  138.  
  139. <div class=’hr_invisible’></div>
  140.  
  141. <section class=”search_not_found”>
  142. <p><?php _e(‘You might want to consider some of our suggestions to get better results:, ‘avia_framework’); ?></p>
  143.  
  144. <?php _e(‘Check your spelling., ‘avia_framework’); ?>
  145. <?php _e(‘Try a similar keyword, for example: tablet instead of laptop., ‘avia_framework’); ?>
  146. <?php _e(‘Try using more than one keyword., ‘avia_framework’); ?>
  147. <?php
  148.  
  149. /**
  150. * Additional output when nothing found in search
  151. *
  152. * @since 4.1.2
  153. * @added_by günter
  154. * @return string cutom HTML escaped for echo | ”
  155. */
  156. $custom_no_earch_result = apply_filters( ‘avf_search_results_pagecontent’,);
  157. echo $custom_no_earch_result;
  158.  
  159. echo</section>;
  160. echo</article>;
  161.  
  162. endif;
  163. echo avia_pagination(, ‘nav’);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement