Advertisement
cipher87

Single Course

Jan 18th, 2023
1,155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.25 KB | Source Code | 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.  
  12.     $title  = __('Blog - Latest News', 'avia_framework'); //default blog title
  13.     $t_link = home_url('/');
  14.     $t_sub = '';
  15.  
  16.     if( avia_get_option( 'frontpage' ) && $new = avia_get_option( 'blogpage' ) )
  17.     {
  18.         $title = get_the_title( $new ); //if the blog is attached to a page use this title
  19.         $t_link = get_permalink( $new );
  20.         $t_sub = avia_post_meta( $new, 'subtitle' );
  21.     }
  22.  
  23.     if( get_post_meta( get_the_ID(), 'header', true ) != 'no' )
  24.     {
  25.         echo avia_title( array( 'heading' => 'strong', 'title' => $title, 'link' => $t_link, 'subtitle' => $t_sub ) );
  26.     }
  27.  
  28.     do_action( 'ava_after_main_title' );
  29.  
  30. ?>
  31.  
  32.         <div class='container_wrap container_wrap_first main_color <?php avia_layout_class( 'main' ); ?>'>
  33.  
  34.             <div class='container template-blog template-single-blog '>
  35.  
  36.                 <main class='content units <?php avia_layout_class( 'content' ); ?> <?php echo avia_blog_class_string(); ?>' <?php avia_markup_helper(array('context' => 'content','post_type'=>'post'));?>>
  37.  
  38.                     <?php
  39.                     /* Run the loop to output the posts.
  40.                     * If you want to overload this in a child theme then include a file
  41.                     * called loop-index.php and that will be used instead.
  42.                     *
  43.                     */
  44.                         get_template_part( 'includes/loop', 'course' );
  45.  
  46.                         $blog_disabled = ( avia_get_option('disable_blog') == 'disable_blog' ) ? true : false;
  47.  
  48.                         if( ! $blog_disabled )
  49.                         {
  50.                             //show related posts based on tags if there are any
  51.                             get_template_part( 'includes/related-posts' );
  52.  
  53.                             //wordpress function that loads the comments template "comments.php"
  54.                             comments_template();
  55.                         }
  56.                     ?>
  57.  
  58.                 <!--end content-->
  59.                 </main>
  60.  
  61.                 <?php
  62.                 $avia_config['currently_viewing'] = 'blog';
  63.                 //get the sidebar
  64.                 get_sidebar();
  65.  
  66.  
  67.                 ?>
  68.  
  69.  
  70.             </div><!--end container-->
  71.  
  72.         </div><!-- close default .container_wrap element -->
  73.  
  74.  
  75. <?php
  76.         get_footer();
  77.  
  78.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement