Advertisement
Guest User

Untitled

a guest
Jun 30th, 2021
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.04 KB | None | 0 0
  1. <?php
  2. if ( !defined('ABSPATH') ){ die(); }
  3.  
  4. global $avia_config;
  5.  
  6. /*
  7. * get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory.
  8. */
  9. get_header();
  10.  
  11. $title = __('Blog - Latest News', 'avia_framework'); //default blog title
  12. $t_link = home_url('/');
  13. $t_sub = "";
  14.  
  15. if(avia_get_option('frontpage') && $new = avia_get_option('blogpage'))
  16. {
  17. $title = get_the_title($new); //if the blog is attached to a page use this title
  18. $t_link = get_permalink($new);
  19. $t_sub = avia_post_meta($new, 'subtitle');
  20. }
  21.  
  22. if( get_post_meta(get_the_ID(), 'header', true) != 'no') echo avia_title(array('heading'=>'strong', 'title' => $title, 'link' => $t_link, 'subtitle' => $t_sub));
  23.  
  24. do_action( 'ava_after_main_title' );
  25.  
  26. $featured_image = get_the_post_thumbnail_url( get_the_ID() );
  27. ?>
  28.  
  29. <div id="section-container-width"
  30. class="avia-section main_color avia-section-default avia-no-border-styling avia-bg-style-scroll avia-builder-el-no-sibling av-minimum-height av-minimum-height-75 container_wrap sidebar_right"
  31. style="background-repeat: no-repeat; background-image: url(<?php echo $featured_image; ?>);background-attachment: scroll; background-position: center center; background-size: cover;"
  32. data-section-bg-repeat="no-repeat" data-av_minimum_height_pc="75">
  33. <div class="container">
  34. <main role="main" itemprop="mainContentOfPage" class="template-page content av-content-small alpha units">
  35. <div class="post-entry">
  36. <div class="entry-content-wrapper clearfix">
  37. </div>
  38. </div>
  39. </main><!-- close content main element -->
  40. </div>
  41. </div>
  42.  
  43. <div class='container_wrap container_wrap_first main_color <?php avia_layout_class( 'main' ); ?>'>
  44.  
  45. <div class='container template-blog template-single-blog '>
  46.  
  47. <main class='content units <?php avia_layout_class( 'content' ); ?> <?php echo avia_blog_class_string(); ?>'
  48. <?php avia_markup_helper(array('context' => 'content','post_type'=>'post'));?>>
  49.  
  50. <?php
  51. /* Run the loop to output the posts.
  52. * If you want to overload this in a child theme then include a file
  53. * called loop-index.php and that will be used instead.
  54. *
  55. */
  56. get_template_part( 'includes/loop', 'index' );
  57.  
  58. $blog_disabled = ( avia_get_option('disable_blog') == 'disable_blog' ) ? true : false;
  59.  
  60. if(!$blog_disabled)
  61. {
  62. //show related posts based on tags if there are any
  63. get_template_part( 'includes/related-posts');
  64.  
  65. //wordpress function that loads the comments template "comments.php"
  66. comments_template();
  67. }
  68. ?>
  69.  
  70. <!--end content-->
  71. </main>
  72.  
  73. <?php
  74. $avia_config['currently_viewing'] = "blog";
  75. //get the sidebar
  76. get_sidebar();
  77.  
  78.  
  79. ?>
  80.  
  81.  
  82. </div>
  83. <!--end container-->
  84.  
  85. </div><!-- close default .container_wrap element -->
  86.  
  87.  
  88. <?php
  89. get_footer();
  90.  
  91.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement