Browse Source

add sticky to desk for edited

windhamdavid 4 years ago
parent
commit
d7d8f0d41b
1 changed files with 6 additions and 0 deletions
  1. 6 0
      page-desk.php

+ 6 - 0
page-desk.php

@@ -22,6 +22,12 @@ get_header(); ?>
 			</div>
 			<div class="col-md-4 studio-tools">
 				<ul>
+					<li>Recently Edited</li>
+          <?php $args = array('post_type' => 'post','posts_per_page' => 5,'post__in' => get_option('sticky_posts'));?>
+					<?php $stickyposts = get_posts($args); foreach ($stickyposts as $post) : setup_postdata($post); ?>
+					       <li style="color:#777"><?php echo get_the_date('m/d/y'); ?> - <a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
+					<?php endforeach; ?>
+          <br>
 					<li>Recent Posts</li>
 					<?php $recentposts = get_posts('numberposts=50'); foreach ($recentposts as $post) : setup_postdata($post); ?>
 					       <li style="color:#777"><?php echo get_the_date('m/d/y'); ?> - <a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>