Browse Source

now post modified

windhamdavid 1 year ago
parent
commit
7517be0033
1 changed files with 10 additions and 0 deletions
  1. 10 0
      page-now.php

+ 10 - 0
page-now.php

@@ -21,6 +21,16 @@ get_header(); ?>
           <div class="col-lg-4 offset-md-1">
 						<h5 class="fw-bold mt-2">Posts</h5>
 						<ul style="margin:0">
+              <?php $sticky = get_option('sticky_posts');?>
+              <?php if( !empty($sticky) ){ ?>
+              <?php $args = array('post_type' => 'post','posts_per_page' => 5,'post__in' => $sticky);?>
+              <?php $stickyposts = get_posts($args); ?>
+                <li>Recently Edited</li>
+                <?php foreach ($stickyposts as $post) : setup_postdata($post); ?>
+                  <li style="color:#777"><?php echo get_the_modified_date('y/m/d'); ?> - <a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
+                <?php endforeach; ?>
+              <br>
+              <?php } ?>
 							<?php $recentposts = get_posts(array( 'numberposts' => 11, 'offset' => 0 ) ); foreach ($recentposts as $post) : setup_postdata($post); ?>
 							       <li style="color:#777"><?php echo get_the_date('y/m/d'); ?> - <a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
 							<?php endforeach; ?>