Guest User

Untitled

a guest
Jan 16th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.69 KB | None | 0 0
  1.     <div class="leftCol">
  2.  
  3.     <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  4.         <h1><?php the_title(); ?></h1>
  5.     <?php endwhile; endif; ?>
  6.     <?php// $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>
  7.  
  8.  
  9.    
  10. <?php //$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>
  11.  
  12.         <?php $args = array(
  13.             'post_type' => array('post', 'project'),
  14.             'orderby' => 'date',
  15.             'order' => 'DESC',
  16.             'paged' => $paged);
  17.         ?>
  18.  
  19.             <?php $loop = new WP_Query($args); ?>
  20.            
  21.             <?php while ($loop->have_posts()) : $loop->the_post(); ?>
  22.             <?php //$showBlog = get_field('show_on_blog'); //var_dump($loop);
  23.             echo get_post_type(); ?>
  24.             <?php if ((get_post_type() == 'post')) : ?>
  25.                     <div class="post">
  26.                         <h2 class="post-title">
  27.                             <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
  28.                         </h2>
  29.                         <div class="info cf">
  30.                             <div class="share-this">
  31.                                 <span class='st_twitter' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' ></span>
  32.                                 <span class='st_facebook' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' ></span>
  33.                                 <span class='st_yahoo' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' ></span>
  34.                                 <span class='st_google_bmarks' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' ></span>
  35.                                 <span class='st_email' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' ></span>
  36.                                 <span class='st_sharethis' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' ></span>
  37.                             </div>
  38.                             <!--<a class="autor" href="<?php /* echo get_author_posts_url(get_the_author_meta('ID')); ?>"><?php the_author_meta('display_name'); */?></a> -->
  39.                             <span class="date"><?php the_date(); ?></span>
  40.                             <?php
  41.                             $num_comments = get_comments_number();
  42.                             if ($num_comments == 0) {
  43.                                 $comments = __('No Comments');
  44.                             } elseif ($num_comments > 1) {
  45.                                 $comments = $num_comments . __(' Comments');
  46.                             } else {
  47.                                 $comments = "1 Comment";
  48.                             }
  49.                             $write_comments = '<a class="coment" href="' . get_comments_link() . '">' . $comments . '</a>';
  50.                             echo $write_comments;
  51.                             ?>
  52.                             <?php if (get_tags()): ?>
  53.                                 <span class="tags"><?php the_tags(); ?></span>
  54.                             <?php endif; ?>
  55.  
  56.                         </div> <!-- info -->
  57.  
  58.                         <?php the_excerpt();?>
  59.  
  60.  
  61.                     </div><!-- post -->
  62.             <?php endif; endwhile;
  63.             wp_reset_postdata(); ?>
  64.  
  65.             <?php
  66.                 next_posts_link('Older Posts');
  67.                 previous_posts_link('Newer Posts');
  68.             ?>
  69. <!--
  70.  
  71.             <div id="nav-above" class="navigation">
  72.                 <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">&larr;</span> Older posts', 'gdesigns')); ?></div>
  73.                 <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">&rarr;</span>', 'gdesigns')); ?></div>
  74.             </div><!-- #nav-above -->
  75.  
  76.     </div> <!-- left-col -->
Add Comment
Please, Sign In to add comment