Advertisement
Guest User

Untitled

a guest
Jan 27th, 2021
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.47 KB | None | 0 0
  1. I got the blog post to show Outlet but not the specific publication or url. Here’s my code:
  2. <pre><code>&lt;?php
  3. if ( ! defined( &#039;ABSPATH&#039; ) ) { exit; } // Exit if accessed directly
  4.  
  5. global $avia_config, $post_loop_count;
  6.  
  7. if(empty($post_loop_count)) $post_loop_count = 1;
  8. $blog_style = !empty($avia_config[&#039;blog_style&#039;]) ? $avia_config[&#039;blog_style&#039;] : avia_get_option(&#039;blog_style&#039;,&#039;multi-big&#039;);
  9. if(is_single()) $blog_style = avia_get_option(&#039;single_post_style&#039;,&#039;single-big&#039;);
  10.  
  11. $blog_global_style = avia_get_option(&#039;blog_global_style&#039;,&#039;&#039;); //alt: elegant-blog
  12.  
  13. $blog_disabled = ( avia_get_option(&#039;disable_blog&#039;) == &#039;disable_blog&#039; ) ? true : false;
  14. if($blog_disabled)
  15. {
  16. if (current_user_can(&#039;edit_posts&#039;))
  17. {
  18. $msg = &#039;&lt;strong&gt;&#039;.__(&#039;Admin notice for:&#039; ).&quot;&lt;/strong&gt;&lt;br&gt;&quot;.
  19. __(&#039;Blog Posts&#039;, &#039;avia_framework&#039; ).&quot;&lt;br&gt;&lt;br&gt;&quot;.
  20. __(&#039;This element was disabled in your theme settings. You can activate it here:&#039; ).&quot;&lt;br&gt;&quot;.
  21. &#039;&lt;a target=&quot;_blank&quot; href=&quot;&#039;.admin_url(&#039;admin.php?page=avia#goto_performance&#039;).&#039;&quot;&gt;&#039;.__(&quot;Performance Settings&quot;,&#039;avia_framework&#039; ).&quot;&lt;/a&gt;&quot;;
  22.  
  23. $content = &quot;&lt;span class=&#039;av-shortcode-disabled-notice&#039;&gt;{$msg}&lt;/span&gt;&quot;;
  24.  
  25. echo $content;
  26. }
  27.  
  28. return;
  29. }
  30.  
  31. $initial_id = avia_get_the_ID();
  32.  
  33. // check if we got posts to display:
  34. if (have_posts()) :
  35.  
  36. while (have_posts()) : the_post();
  37.  
  38.  
  39. /*
  40. * get the current post id, the current post class and current post format
  41. */
  42. $url = &quot;&quot;;
  43. $current_post = array();
  44. $current_post[&#039;post_loop_count&#039;]= $post_loop_count;
  45. $current_post[&#039;the_id&#039;] = get_the_ID();
  46. $current_post[&#039;parity&#039;] = $post_loop_count % 2 ? &#039;odd&#039; : &#039;even&#039;;
  47. $current_post[&#039;last&#039;] = count($wp_query-&gt;posts) == $post_loop_count ? &quot; post-entry-last &quot; : &quot;&quot;;
  48. $current_post[&#039;post_type&#039;] = get_post_type($current_post[&#039;the_id&#039;]);
  49. $current_post[&#039;post_class&#039;] = &quot;post-entry-&quot;.$current_post[&#039;the_id&#039;].&quot; post-loop-&quot;.$post_loop_count.&quot; post-parity-&quot;.$current_post[&#039;parity&#039;].$current_post[&#039;last&#039;].&quot; &quot;.$blog_style;
  50. $current_post[&#039;post_class&#039;] .= ($current_post[&#039;post_type&#039;] == &quot;post&quot;) ? &#039;&#039; : &#039; post&#039;;
  51. $current_post[&#039;post_format&#039;] = get_post_format() ? get_post_format() : &#039;standard&#039;;
  52. $current_post[&#039;post_layout&#039;] = avia_layout_class(&#039;main&#039;, false);
  53. $blog_content = !empty($avia_config[&#039;blog_content&#039;]) ? $avia_config[&#039;blog_content&#039;] : &quot;content&quot;;
  54.  
  55. /*If post uses builder change content to exerpt on overview pages*/
  56. if( Avia_Builder()-&gt;get_alb_builder_status( $current_post[&#039;the_id&#039;] ) &amp;&amp; !is_singular($current_post[&#039;the_id&#039;]) &amp;&amp; $current_post[&#039;post_type&#039;] == &#039;post&#039;)
  57. {
  58. $current_post[&#039;post_format&#039;] = &#039;standard&#039;;
  59. $blog_content = &quot;excerpt_read_more&quot;;
  60. }
  61.  
  62. /**
  63. * Allows especially for ALB posts to change output to &#039;content&#039;
  64. * Supported since 4.5.5
  65. *
  66. * @since 4.5.5
  67. * @return string
  68. */
  69. $blog_content = apply_filters( &#039;avf_blog_content_in_loop&#039;, $blog_content, $current_post, $blog_style, $blog_global_style );
  70.  
  71.  
  72. /*
  73. * retrieve slider, title and content for this post,...
  74. */
  75. $size = strpos($blog_style, &#039;big&#039;) ? (strpos($current_post[&#039;post_layout&#039;], &#039;sidebar&#039;) !== false) ? &#039;entry_with_sidebar&#039; : &#039;entry_without_sidebar&#039; : &#039;square&#039;;
  76.  
  77. if(!empty($avia_config[&#039;preview_mode&#039;]) &amp;&amp; !empty($avia_config[&#039;image_size&#039;]) &amp;&amp; $avia_config[&#039;preview_mode&#039;] == &#039;custom&#039;) $size = $avia_config[&#039;image_size&#039;];
  78.  
  79. /**
  80. * @since 4.5.4
  81. * @return string
  82. */
  83. $current_post[&#039;slider&#039;] = apply_filters( &#039;avf_post_featured_image_link&#039;, get_the_post_thumbnail( $current_post[&#039;the_id&#039;], $size ), $current_post, $size );
  84.  
  85. /**
  86. * Backwards comp. to checkbox prior v4.5.3 (now selectbox with &#039;&#039; or &#039;1&#039;)
  87. */
  88. $hide_featured_image = empty( get_post_meta( $current_post[&#039;the_id&#039;], &#039;_avia_hide_featured_image&#039;, true ) ) ? false : true;
  89. if( is_single( $initial_id ) &amp;&amp; $hide_featured_image )
  90. {
  91. $current_post[&#039;slider&#039;] = &#039;&#039;;
  92. }
  93.  
  94. $current_post[&#039;title&#039;] = get_the_title();
  95.  
  96. /**
  97. * Allow 3rd party to hook and return a plugin specific content.
  98. * This returned content replaces Enfold&#039;s standard content building procedure.
  99. *
  100. * @since 4.5.7.2
  101. * @param string
  102. * @param string $context
  103. * @return string
  104. */
  105. $current_post[&#039;content&#039;] = apply_filters( &#039;avf_the_content&#039;, &#039;&#039;, &#039;loop_index&#039; );
  106. if( &#039;&#039; == $current_post[&#039;content&#039;] )
  107. {
  108. $current_post[&#039;content&#039;] = $blog_content == &quot;content&quot; ? get_the_content(__(&#039;Read more&#039;,&#039;avia_framework&#039;).&#039;&lt;span class=&quot;more-link-arrow&quot;&gt;&lt;/span&gt;&#039;) : get_the_excerpt();
  109. $current_post[&#039;content&#039;] = $blog_content == &quot;excerpt_read_more&quot; ? $current_post[&#039;content&#039;].&#039;&lt;div class=&quot;read-more-link&quot;&gt;&lt;a href=&quot;&#039;.get_permalink().&#039;&quot; class=&quot;more-link&quot;&gt;&#039;.__(&#039;Read more&#039;,&#039;avia_framework&#039;).&#039;&lt;span class=&quot;more-link-arrow&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&#039; : $current_post[&#039;content&#039;];
  110. $current_post[&#039;before_content&#039;] = &quot;&quot;;
  111.  
  112. /*
  113. * ...now apply a filter, based on the post type... (filter function is located in includes/helper-post-format.php)
  114. */
  115. $current_post = apply_filters( &#039;post-format-&#039;.$current_post[&#039;post_format&#039;], $current_post );
  116. $with_slider = empty($current_post[&#039;slider&#039;]) ? &quot;&quot; : &quot;with-slider&quot;;
  117.  
  118. /*
  119. * ... last apply the default wordpress filters to the content
  120. */
  121. $current_post[&#039;content&#039;] = str_replace(&#039;]]&gt;&#039;, &#039;]]&gt;&#039;, apply_filters(&#039;the_content&#039;, $current_post[&#039;content&#039;] ));
  122. }
  123.  
  124. /*
  125. * Now extract the variables so that $current_post[&#039;slider&#039;] becomes $slider, $current_post[&#039;title&#039;] becomes $title, etc
  126. */
  127. extract($current_post);
  128.  
  129. /*
  130. * render the html:
  131. */
  132.  
  133. echo &quot;&lt;article class=&#039;&quot;.implode(&quot; &quot;, get_post_class(&#039;post-entry post-entry-type-&#039;.$post_format . &quot; &quot; . $post_class . &quot; &quot;.$with_slider)).&quot;&#039; &quot;.avia_markup_helper(array(&#039;context&#039; =&gt; &#039;entry&#039;,&#039;echo&#039;=&gt;false)).&quot;&gt;&quot;;
  134.  
  135.  
  136.  
  137. //default link for preview images
  138. $link = !empty($url) ? $url : get_permalink();
  139.  
  140. //preview image description
  141. $desc = &#039;&#039;;
  142. $thumb_post = get_post( get_post_thumbnail_id() );
  143. if( $thumb_post instanceof WP_Post )
  144. {
  145. if( &#039;&#039; != trim( $thumb_post-&gt;post_excerpt ) )
  146. {
  147. // return &quot;Caption&quot; from media gallery
  148. $desc = $thumb_post-&gt;post_excerpt;
  149. }
  150. else if( &#039;&#039; != trim( $thumb_post-&gt;post_title ) )
  151. {
  152. // return &quot;Title&quot; from media gallery
  153. $desc = $thumb_post-&gt;post_title;
  154. }
  155. else if( &#039;&#039; != trim( $thumb_post-&gt;post_content ) )
  156. {
  157. // return &quot;Description&quot; from media gallery
  158. $desc = $thumb_post-&gt;post_content;
  159. }
  160. }
  161.  
  162. $desc = trim( $desc );
  163. if( &#039;&#039; == $desc )
  164. {
  165. $desc = trim( the_title_attribute( &#039;echo=0&#039; ) );
  166. }
  167.  
  168. /**
  169. * Allows to change the title attribute text for the featured image.
  170. * If &#039;&#039; is returned, then no title attribute is added.
  171. *
  172. * @since 4.6.4
  173. * @param string $desc
  174. * @param string $context &#039;loop_index&#039;
  175. * @param WP_Post $thumb_post
  176. */
  177. $featured_img_title = apply_filters( &#039;avf_featured_image_title_attr&#039;, $desc, &#039;loop_index&#039;, $thumb_post );
  178.  
  179. $featured_img_title = &#039;&#039; != trim( $featured_img_title ) ? &#039; title=&quot;&#039; . esc_attr( $featured_img_title ) . &#039;&quot; &#039; : &#039;&#039;;
  180.  
  181. //on single page replace the link with a fullscreen image
  182. if(is_singular())
  183. {
  184. $link = avia_image_by_id(get_post_thumbnail_id(), &#039;large&#039;, &#039;url&#039;);
  185. }
  186.  
  187. if ( !in_array( $blog_style, array(&#039;bloglist-simple&#039;, &#039;bloglist-compact&#039;, &#039;bloglist-excerpt&#039;) ) ) {
  188. //echo preview image
  189. if (strpos($blog_global_style, &#039;elegant-blog&#039;) === false) {
  190. if (strpos($blog_style, &#039;big&#039;) !== false) {
  191. if ($slider) $slider = &#039;&lt;a href=&quot;&#039; . $link . &#039;&quot; &#039; . $featured_img_title . &#039;&gt;&#039; . $slider . &#039;&lt;/a&gt;&#039;;
  192. if ($slider) echo &#039;&lt;div class=&quot;big-preview &#039; . $blog_style . &#039;&quot;&gt;&#039; . $slider . &#039;&lt;/div&gt;&#039;;
  193. }
  194.  
  195. if (!empty($before_content))
  196. echo &#039;&lt;div class=&quot;big-preview &#039; . $blog_style . &#039;&quot;&gt;&#039; . $before_content . &#039;&lt;/div&gt;&#039;;
  197. }
  198. }
  199.  
  200. echo &quot;&lt;div class=&#039;blog-meta&#039;&gt;&quot;;
  201.  
  202. $blog_meta_output = &quot;&quot;;
  203. $icon = &#039;&lt;span class=&quot;iconfont&quot; &#039;.av_icon_string($post_format).&#039;&gt;&lt;/span&gt;&#039;;
  204.  
  205. if(strpos($blog_style, &#039;multi&#039;) !== false)
  206. {
  207. $gravatar = &quot;&quot;;
  208. $link = get_post_format_link($post_format);
  209. if($post_format == &#039;standard&#039;)
  210. {
  211. $author_name = apply_filters(&#039;avf_author_name&#039;, get_the_author_meta(&#039;display_name&#039;, $post-&gt;post_author), $post-&gt;post_author);
  212. $author_email = apply_filters(&#039;avf_author_email&#039;, get_the_author_meta(&#039;email&#039;, $post-&gt;post_author), $post-&gt;post_author);
  213.  
  214. $gravatar_alt = esc_html($author_name);
  215. $gravatar = get_avatar($author_email, &#039;81&#039;, &quot;blank&quot;, $gravatar_alt);
  216. $link = get_author_posts_url($post-&gt;post_author);
  217. }
  218.  
  219. $blog_meta_output = &quot;&lt;a href=&#039;{$link}&#039; class=&#039;post-author-format-type&#039;&gt;&lt;span class=&#039;rounded-container&#039;&gt;&quot;.$gravatar.$icon.&quot;&lt;/span&gt;&lt;/a&gt;&quot;;
  220. }
  221. else if(strpos($blog_style, &#039;small&#039;) !== false)
  222. {
  223. $blog_meta_output = &quot;&lt;a href=&#039;{$link}&#039; class=&#039;small-preview&#039; {$featured_img_title}&gt;&quot;.$slider.$icon.&quot;&lt;/a&gt;&quot;;
  224. }
  225.  
  226. echo apply_filters(&#039;avf_loop_index_blog_meta&#039;, $blog_meta_output);
  227.  
  228. echo &quot;&lt;/div&gt;&quot;;
  229.  
  230. echo &quot;&lt;div class=&#039;entry-content-wrapper clearfix {$post_format}-content&#039;&gt;&quot;;
  231. echo &#039;&lt;header class=&quot;entry-content-header&quot;&gt;&#039;;
  232.  
  233. if ($blog_style == &#039;bloglist-compact&#039;) {
  234. $format = get_post_format();
  235. echo &quot;&lt;span class=&#039; fallback-post-type-icon&#039; &quot;.av_icon_string($format).&quot;&gt;&lt;/span&gt;&quot;;
  236. }
  237.  
  238. $close_header = &quot;&lt;/header&gt;&quot;;
  239.  
  240. $content_output = &#039;&lt;div class=&quot;entry-content&quot; &#039;.avia_markup_helper(array(&#039;context&#039; =&gt; &#039;entry_content&#039;,&#039;echo&#039;=&gt;false)).&#039;&gt;&#039;;
  241. $content_output .= $content;
  242. $content_output .= &#039;&lt;/div&gt;&#039;;
  243.  
  244.  
  245. $taxonomies = get_object_taxonomies(get_post_type($the_id));
  246. $cats = &#039;&#039;;
  247. $excluded_taxonomies = array_merge( get_taxonomies( array( &#039;public&#039; =&gt; false ) ), array(&#039;post_tag&#039;,&#039;post_format&#039;) );
  248. $excluded_taxonomies = apply_filters(&#039;avf_exclude_taxonomies&#039;, $excluded_taxonomies, get_post_type($the_id), $the_id);
  249.  
  250. if(!empty($taxonomies))
  251. {
  252. foreach($taxonomies as $taxonomy)
  253. {
  254. if(!in_array($taxonomy, $excluded_taxonomies))
  255. {
  256. $cats .= get_the_term_list($the_id, $taxonomy, &#039;&#039;, &#039;, &#039;,&#039;&#039;).&#039; &#039;;
  257. }
  258. }
  259. }
  260.  
  261.  
  262.  
  263. //elegant blog
  264. //prev: if( $blog_global_style == &#039;elegant-blog&#039; )
  265. if( strpos($blog_global_style, &#039;elegant-blog&#039;) !== false )
  266. {
  267. $cat_output = &quot;&quot;;
  268.  
  269. if(!empty($cats))
  270. {
  271. $cat_output .= &#039;&lt;span class=&quot;blog-categories minor-meta&quot;&gt;&#039;;
  272. $cat_output .= $cats;
  273. $cat_output .= &#039;&lt;/span&gt;&#039;;
  274. $cats = &quot;&quot;;
  275. }
  276.  
  277. if ( in_array( $blog_style, array(&#039;bloglist-compact&#039;,&#039;bloglist-excerpt&#039;) ) ) {
  278. echo $title;
  279. }
  280. else {
  281.  
  282. // The wrapper div prevents the Safari reader from displaying the content twice ¯\_(ツ)_/¯
  283. echo &#039;&lt;div class=&quot;av-heading-wrapper&quot;&gt;&#039;;
  284. if (strpos($blog_global_style, &#039;modern-blog&#039;) === false){
  285. echo $cat_output.$title;
  286. }
  287. else {
  288. echo $title.$cat_output;
  289. }
  290. echo &#039;&lt;/div&gt;&#039;;
  291. }
  292.  
  293. echo $close_header;
  294. $close_header = &quot;&quot;;
  295.  
  296. if ( !in_array( $blog_style, array(&#039;bloglist-simple&#039;, &#039;bloglist-compact&#039;, &#039;bloglist-excerpt&#039;) ) ) {
  297.  
  298. echo &#039;&lt;span class=&quot;av-vertical-delimiter&quot;&gt;&lt;/span&gt;&#039;;
  299.  
  300. //echo preview image
  301. if (strpos($blog_style, &#039;big&#039;) !== false) {
  302. if ($slider) $slider = &#039;&lt;a href=&quot;&#039; . $link . &#039;&quot; &#039; . $featured_img_title . &#039;&gt;&#039; . $slider . &#039;&lt;/a&gt;&#039;;
  303. if ($slider) echo &#039;&lt;div class=&quot;big-preview &#039; . $blog_style . &#039;&quot;&gt;&#039; . $slider . &#039;&lt;/div&gt;&#039;;
  304. }
  305.  
  306. if (!empty($before_content))
  307. echo &#039;&lt;div class=&quot;big-preview &#039; . $blog_style . &#039;&quot;&gt;&#039; . $before_content . &#039;&lt;/div&gt;&#039;;
  308.  
  309. echo $content_output;
  310. }
  311.  
  312. $cats = &quot;&quot;;
  313. $title = &quot;&quot;;
  314. $content_output = &quot;&quot;;
  315. }
  316.  
  317.  
  318.  
  319.  
  320. echo $title;
  321.  
  322. if ($blog_style !== &#039;bloglist-compact&#039;) :
  323.  
  324. echo &quot;&lt;span class=&#039;post-meta-infos&#039;&gt;&quot;;
  325.  
  326. // add Publication to post-meta-info section of blog
  327. $outlet = get_post_meta($post-&gt;ID, &#039;outlet&#039;, true);
  328. if(!empty($outlet))
  329. {
  330. echo &quot;&lt;time class=&#039;date-container minor-meta updated&#039; &gt;&quot;.get_post_meta( $post_id, $key = &#039;group_600ae1c0bda45&#039;, $single = false );
  331.  
  332. echo &quot;&lt;time class=&#039;date-container minor-meta updated&#039; &gt;&quot;.get_the_time(get_option(&#039;date_format&#039;)).&quot;&lt;/time&gt;&quot;;
  333. echo &quot;&lt;span class=&#039;text-sep text-sep-date&#039;&gt;/&lt;/span&gt;&quot;;
  334.  
  335.  
  336. }
  337.  
  338. echo &#039;&lt;span class=&quot;outlets minor-meta&quot;&gt;&#039;. __( &#039;Outlet:&#039;,&#039;avia_framework&#039; ) . &#039; &#039;;
  339. echo $outlet;
  340. echo &#039;&lt;/span&gt;&lt;span class=&quot;text-sep text-sep-cat&quot;&gt;/&lt;/span&gt;&#039;;
  341.  
  342.  
  343. // end add Publication
  344.  
  345. if ( get_comments_number() != &quot;0&quot; || comments_open() ){
  346.  
  347. echo &quot;&lt;span class=&#039;comment-container minor-meta&#039;&gt;&quot;;
  348. comments_popup_link( &quot;0 &quot;.__(&#039;Comments&#039;,&#039;avia_framework&#039;),
  349. &quot;1 &quot;.__(&#039;Comment&#039; ,&#039;avia_framework&#039;),
  350. &quot;% &quot;.__(&#039;Comments&#039;,&#039;avia_framework&#039;),&#039;comments-link&#039;,
  351. &quot;&quot;.__(&#039;Comments Disabled&#039;,&#039;avia_framework&#039;));
  352. echo &quot;&lt;/span&gt;&quot;;
  353. echo &quot;&lt;span class=&#039;text-sep text-sep-comment&#039;&gt;/&lt;/span&gt;&quot;;
  354. }
  355.  
  356. if(!empty($cats))
  357. {
  358. echo &#039;&lt;span class=&quot;blog-categories minor-meta&quot;&gt;&#039;.__(&#039;in&#039;,&#039;avia_framework&#039;).&quot; &quot;;
  359. echo $cats;
  360. echo &#039;&lt;/span&gt;&lt;span class=&quot;text-sep text-sep-cat&quot;&gt;/&lt;/span&gt;&#039;;
  361. }
  362.  
  363.  
  364. echo &#039;&lt;span class=&quot;blog-author minor-meta&quot;&gt;&#039;.__(&#039;by&#039;,&#039;avia_framework&#039;).&quot; &quot;;
  365. echo &#039;&lt;span class=&quot;entry-author-link&quot; &gt;&#039;;
  366. echo &#039;&lt;span class=&quot;vcard author&quot;&gt;&lt;span class=&quot;fn&quot;&gt;&#039;;
  367. the_author_posts_link();
  368. echo &#039;&lt;/span&gt;&lt;/span&gt;&#039;;
  369. echo &#039;&lt;/span&gt;&#039;;
  370. echo &#039;&lt;/span&gt;&#039;;
  371.  
  372. if ($blog_style == &#039;bloglist-simple&#039;) {
  373. echo &#039;&lt;div class=&quot;read-more-link&quot;&gt;&lt;a href=&quot;&#039;.get_permalink().&#039;&quot; class=&quot;more-link&quot;&gt;&#039;.__(&#039;Read more&#039;,&#039;avia_framework&#039;).&#039;&lt;span class=&quot;more-link-arrow&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&#039;;
  374. }
  375.  
  376. echo &#039;&lt;/span&gt;&#039;;
  377.  
  378. endif; // display meta-infos on all layouts except bloglist-compact
  379.  
  380. echo $close_header;
  381.  
  382. // echo the post content
  383. if ( $blog_style == &#039;bloglist-excerpt&#039;){
  384. the_excerpt();
  385. echo &#039;&lt;div class=&quot;read-more-link&quot;&gt;&lt;a href=&quot;&#039;.get_permalink().&#039;&quot; class=&quot;more-link&quot;&gt;&#039;.__(&#039;Read more&#039;,&#039;avia_framework&#039;).&#039;&lt;span class=&quot;more-link-arrow&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&#039;;
  386. }
  387.  
  388. if ( !in_array( $blog_style, array(&#039;bloglist-simple&#039;, &#039;bloglist-compact&#039;, &#039;bloglist-excerpt&#039;) ) ) {
  389. echo $content_output;
  390. }
  391.  
  392. echo &#039;&lt;footer class=&quot;entry-footer&quot;&gt;&#039;;
  393.  
  394. $avia_wp_link_pages_args = apply_filters(&#039;avf_wp_link_pages_args&#039;, array(
  395. &#039;before&#039; =&gt;&#039;&lt;nav class=&quot;pagination_split_post&quot;&gt;&#039;.__(&#039;Pages:&#039;,&#039;avia_framework&#039;),
  396. &#039;after&#039; =&gt;&#039;&lt;/nav&gt;&#039;,
  397. &#039;pagelink&#039; =&gt; &#039;&lt;span&gt;%&lt;/span&gt;&#039;,
  398. &#039;separator&#039; =&gt; &#039; &#039;,
  399. ));
  400.  
  401. wp_link_pages($avia_wp_link_pages_args);
  402.  
  403. if(is_single() &amp;&amp; !post_password_required())
  404. {
  405. //tags on single post
  406. if(has_tag())
  407. {
  408. echo &#039;&lt;span class=&quot;blog-tags minor-meta&quot;&gt;&#039;;
  409. the_tags(&#039;&lt;strong&gt;&#039;.__(&#039;Tags:&#039;,&#039;avia_framework&#039;).&#039;&lt;/strong&gt;&lt;span&gt; &#039;);
  410. echo &#039;&lt;/span&gt;&lt;/span&gt;&#039;;
  411. }
  412.  
  413. //share links on single post
  414. avia_social_share_links();
  415.  
  416. }
  417.  
  418. do_action(&#039;ava_after_content&#039;, $the_id, &#039;post&#039;);
  419.  
  420. echo &#039;&lt;/footer&gt;&#039;;
  421.  
  422. echo &quot;&lt;div class=&#039;post_delimiter&#039;&gt;&lt;/div&gt;&quot;;
  423. echo &quot;&lt;/div&gt;&quot;;
  424. echo &quot;&lt;div class=&#039;post_author_timeline&#039;&gt;&lt;/div&gt;&quot;;
  425. echo av_blog_entry_markup_helper($current_post[&#039;the_id&#039;]);
  426. echo &quot;&lt;/article&gt;&quot;;
  427.  
  428. $post_loop_count++;
  429. endwhile;
  430. else:
  431.  
  432. $default_heading = &#039;h1&#039;;
  433. $args = array(
  434. &#039;heading&#039; =&gt; $default_heading,
  435. &#039;extra_class&#039; =&gt; &#039;&#039;
  436. );
  437.  
  438. /**
  439. * @since 4.5.5
  440. * @return array
  441. */
  442. $args = apply_filters( &#039;avf_customize_heading_settings&#039;, $args, &#039;loop_index::nothing_found&#039;, array() );
  443.  
  444. $heading = ! empty( $args[&#039;heading&#039;] ) ? $args[&#039;heading&#039;] : $default_heading;
  445. $css = ! empty( $args[&#039;extra_class&#039;] ) ? $args[&#039;extra_class&#039;] : &#039;&#039;;
  446. ?&gt;
  447.  
  448. &lt;article class=&quot;entry&quot;&gt;
  449. &lt;header class=&quot;entry-content-header&quot;&gt;
  450. &lt;?php echo &quot;&lt;{$heading} class=&#039;post-title entry-title {$css}&#039;&gt;&quot; . __( &#039;Nothing Found&#039;, &#039;avia_framework&#039; ) . &quot;&lt;/{$heading}&gt;&quot;; ?&gt;
  451. &lt;/header&gt;
  452.  
  453. &lt;p class=&quot;entry-content&quot; &lt;?php avia_markup_helper(array(&#039;context&#039; =&gt; &#039;entry_content&#039;)); ?&gt;&gt;&lt;?php _e(&#039;Sorry, no posts matched your criteria&#039;, &#039;avia_framework&#039;); ?&gt;&lt;/p&gt;
  454.  
  455. &lt;footer class=&quot;entry-footer&quot;&gt;&lt;/footer&gt;
  456. &lt;/article&gt;
  457.  
  458. &lt;?php
  459.  
  460. endif;
  461.  
  462. if(empty($avia_config[&#039;remove_pagination&#039;] ))
  463. {
  464. echo &quot;&lt;div class=&#039;{$blog_style}&#039;&gt;&quot;.avia_pagination(&#039;&#039;, &#039;nav&#039;).&quot;&lt;/div&gt;&quot;;
  465. }
  466. </code></pre>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement