yakusa47

loop-single-1.php

Jul 1st, 2017
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.94 KB | None | 0 0
  1. <?php
  2. /**
  3.  * single Post template 1
  4.  * /public_html/wp-content/themes/newspaper/loop-single-1.php
  5.  * /public_html/wp-content/themes/newspaper/author.php -> https://pastebin.com/mD069dDP
  6.  **/
  7.  
  8. if (have_posts()) {
  9.     the_post();
  10.  
  11.     $td_mod_single = new td_module_single($post);
  12.  
  13.     ?>
  14.  
  15.  
  16.     <article id="post-<?php echo $td_mod_single->post->ID;?>" class="<?php echo join(' ', get_post_class());?>" <?php echo $td_mod_single->get_item_scope();?>>
  17.         <div class="td-post-header">
  18.  
  19.             <?php echo $td_mod_single->get_category(); ?>
  20.  
  21.             <header class="td-post-title">
  22.                 <?php echo $td_mod_single->get_title();?>
  23.  
  24.  
  25.                 <?php if (!empty($td_mod_single->td_post_theme_settings['td_subtitle'])) { ?>
  26.                     <p class="td-post-sub-title"><?php echo $td_mod_single->td_post_theme_settings['td_subtitle'];?></p>
  27.                 <?php } ?>
  28.  
  29.  
  30.                 <div class="td-module-meta-info">
  31.                     <?php echo $td_mod_single->get_author();?>
  32.                     <?php echo $td_mod_single->get_date(false);?>
  33.                     <?php echo $td_mod_single->get_comments();?>
  34.                     <?php echo $td_mod_single->get_views();?>
  35.                 </div>
  36.  
  37.             </header>
  38.  
  39.  
  40.         </div>
  41.  
  42.         <?php echo $td_mod_single->get_social_sharing_top();?>
  43.  
  44.  
  45.         <div class="td-post-content">
  46.             <div class="td-featured-image-rec">
  47.  
  48.             <?php
  49.             // override the default featured image by the templates (single.php and home.php/index.php - blog loop)
  50.             if (!empty(td_global::$load_featured_img_from_template)) {
  51.                 echo $td_mod_single->get_image(td_global::$load_featured_img_from_template);
  52.             } else {
  53.                 echo $td_mod_single->get_image('td_696x0');
  54.             }
  55.  
  56.             $tds_post_style_1_title = td_util::get_option('tds_post_style_1_title');
  57.  
  58.             // ad spot
  59.             echo td_global_blocks::get_instance('td_block_ad_box')->render(array('spot_id' => 'post_style_1', 'spot_title' => $tds_post_style_1_title)); ?>
  60.             </div>
  61.  
  62.             <?php echo $td_mod_single->get_content();?>
  63.         </div>
  64.  
  65.  
  66.         <footer>
  67.             <?php echo $td_mod_single->get_post_pagination();?>
  68.             <?php echo $td_mod_single->get_review();?>
  69.  
  70.             <div class="td-post-source-tags">
  71.                 <?php echo $td_mod_single->get_source_and_via();?>
  72.                 <?php echo $td_mod_single->get_the_tags();?>
  73.             </div>
  74.  
  75.             <?php echo $td_mod_single->get_social_sharing_bottom();?>
  76.             <?php echo $td_mod_single->get_next_prev_posts();?>
  77.             <?php echo $td_mod_single->get_author_box();?>
  78.             <?php echo $td_mod_single->get_item_scope_meta();?>
  79.         </footer>
  80.  
  81.     </article> <!-- /.post -->
  82.  
  83.     <?php echo $td_mod_single->related_posts();?>
  84.  
  85. <?php
  86. } else {
  87.     //no posts
  88.     echo td_page_generator::no_posts();
  89. }
Advertisement
Add Comment
Please, Sign In to add comment