Guest User

Untitled

a guest
Apr 26th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.02 KB | None | 0 0
  1. <?php
  2. // if AJAX request, only output content section
  3. if(!isset($_GET['action'])) { get_header(); }
  4. else { defined('DOING_AJAX') || define('DOING_AJAX', true); }
  5. ?>
  6.  
  7. <?php
  8. simpledark_content_header();
  9. if(have_posts()) {
  10. while(have_posts()) {
  11.     the_post();
  12. ?>
  13.         <div id="post-<?php the_ID(); ?>" <?php post_class();?>>
  14. <?php
  15.     // give some extra metadata (aka is-sticky, is-protected, is-private, etc.)
  16.     simpledark_extra_post_meta();
  17. ?>
  18. //          <h2 class="post-title"><a rel="bookmark" title="<?php printf(__('Permanent Link to %s', THEME_NAME), the_title_attribute('echo=0')); ?>" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
  19. //          <div class="post-meta"><?php the_time(simpledark_time_format('date')); ?> / <?php if($post->post_type != 'page') { the_author_posts_link(); _e(' posted in ', THEME_NAME); the_category(', '); } else { printf(__('Posted by %s', THEME_NAME), //simpledark_get_the_author_posts_link()); } ?> / <?php if(function_exists('the_views')) { the_views(); echo ' / '; } if(post_password_required()) { _e('X Comments', THEME_NAME); } else { comments_popup_link(__('No Comments', THEME_NAME), __('1 Comment', THEME_NAME), __('% Comments', //THEME_NAME), 'comment-link', __('Comments Off', THEME_NAME)); } edit_post_link(__('Edit', THEME_NAME), ' / '); ?></div>
  20.             <div class="entry">
  21. <?php the_post_thumbnail(); ?>
  22. <?php the_content('&raquo;' . __('Read More', THEME_NAME)); ?>
  23. <?php
  24.     $args = array(
  25.         'before'            => '<div class="post-pages">' . __('Pages:', THEME_NAME),
  26.         'after'             => '</div>',
  27.         'nextpagelink'      => __('Next Page', THEME_NAME),
  28.         'previouspagelink'  => __('Previous Page', THEME_NAME)
  29.     );
  30.     wp_link_pages($args);
  31. ?>
  32.             </div>
  33. <?php if($GLOBALS['simpledark_options']['show_tags_on_archive_pages']) { // show post tags according to theme option ?>
  34.             <div class="post-info"><?php if(get_the_tags()) { the_tags('< ', ', ', ' >'); } else { echo('< ' . __('NO TAGS', THEME_NAME) . ' >'); } ?></div>
  35. <?php } ?>
  36.         </div>
  37. <?php
  38. }
  39. if(simpledark_is_paged()) { // create page navigation if there are multiple pages, support 2 plugins by default (aka WP-Pagenavi and Paginator)
  40. ?>
  41.         <div class="pagenavi">
  42. <?php
  43. if(function_exists('wp_paginator')) {
  44.     wp_paginator();
  45. } else if(function_exists('wp_pagenavi')) {
  46.     wp_pagenavi();
  47. } else {
  48. ?>
  49.             <span class="previous-page"><?php next_posts_link('&laquo; ' . __('Older Posts', THEME_NAME)); ?></span><span class="next-page"><?php previous_posts_link(__('Newer Posts', THEME_NAME) . ' &raquo;'); ?></span>
  50. <?php
  51. }
  52. ?>
  53.         </div>
  54. <?php
  55. }
  56. }
  57. else { // no posts found and suggest to go backward
  58. ?>
  59.         <div class="no-post"><?php printf(__('No posts found. Why not <a title="Go Back" href="%1$s"%2$s>go back to the last page</a> ?', THEME_NAME), (defined('DOING_AJAX') && DOING_AJAX)? '#' : $_SERVER['HTTP_REFERER'], (defined('DOING_AJAX') && DOING_AJAX)? 'onclick="loadContent(contentCache, $(\'#content\')); searched = false;"' : ''); ?></div>
  60. <?php
  61. }
  62. ?>
  63. <?php
  64. // if AJAX request, only output content section
  65. if(!isset($_GET['action'])) { get_footer(); }
  66. ?>
Add Comment
Please, Sign In to add comment