Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="statistics">
- <?php
- $today = current_time('mysql', 1);
- if ($recentposts = $wpdb->get_results("SELECT ID, post_title, post_modified FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' AND post_name NOT LIKE '%revision%' AND post_name NOT LIKE '%autosave%' AND post_modified_gmt < '$today' ORDER BY post_modified_gmt")) :
- ?>
- <h2><?php _e('ULTIME REVISIONI'); ?></h2>
- <ul>
- <?php $args = array('category' => '', 'orderby' => 'modified', 'post_status' => 'publish', 'posts_per_page' => 11);
- $recent_posts = wp_get_recent_posts($args);
- foreach ($recent_posts as $post) {
- if ($post["post_title"] == ''){ $post["post_title"] = sprintf(__('Post #%s'), $post["ID"]);
- }
- ?>
- <li><a href='<?php echo get_permalink($post["ID"]) ?>'>
- <?php echo mysql2date('d/m/Y', $post["post_modified"]) ?>
- -
- <?php echo $post["post_title"] ?>
- </a></li> <?php } ?>
- </ul>
- </div>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement