Advertisement
Guest User

original_date

a guest
Feb 4th, 2019
1,558
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.98 KB | None | 0 0
  1. function simplecatch_loop() {
  2.  
  3. if ( is_page() ): ?>
  4.  
  5. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  6. <header class="entry-header">
  7. <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
  8. </header><!-- .entry-header -->
  9. <div class="entry-content clearfix">
  10. <?php the_content();
  11. // copy this <!--nextpage--> and paste at the post content where you want to break the page
  12. wp_link_pages(array(
  13. 'before' => '<div class="pagination">Pages: ',
  14. 'after' => '</div>',
  15. 'link_before' => '<span>',
  16. 'link_after' => '</span>',
  17. 'pagelink' => '%',
  18. 'echo' => 1
  19. ) ); ?>
  20. </div><!-- .entry-content -->
  21. </article><!-- #post-## -->
  22.  
  23. <?php elseif ( is_single() ): ?>
  24.  
  25. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  26. <header class="entry-header">
  27. <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
  28. <div class="entry-meta">
  29. <ul class="clearfix">
  30. <li class="no-padding-left author vcard"><a class="url fn n" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" title="<?php echo esc_attr(get_the_author_meta( 'display_name' ) ); ?>" rel="author"><?php _e( 'By', 'simple-catch' ); ?>&nbsp;<?php the_author_meta( 'display_name' );?></a></li>
  31. <li class="entry-date updated"><?php echo get_the_date(); ?></li>
  32. <li><?php comments_popup_link( __( 'No Comments', 'simple-catch' ), __( '1 Comment', 'simple-catch' ), __( '% Comments', 'simple-catch' ) ); ?></li>
  33. </ul>
  34. </div>
  35. </header>
  36. <div class="entry-content clearfix">
  37. <?php the_content();
  38. // copy this <!--nextpage--> and paste at the post content where you want to break the page
  39. wp_link_pages(array(
  40. 'before' => '<div class="pagination">Pages: ',
  41. 'after' => '</div>',
  42. 'link_before' => '<span>',
  43. 'link_after' => '</span>',
  44. 'pagelink' => '%',
  45. 'echo' => 1
  46. ) );
  47. ?>
  48. </div>
  49. <footer class="entry-meta">
  50. <?php
  51. $tag = get_the_tags();
  52. if (! $tag ) { ?>
  53. <div class='tags'><?php _e( 'Categories: ', 'simple-catch' ); ?> <?php the_category(', '); ?> </div>
  54. <?php } else {
  55. the_tags( '<div class="tags"> ' . __('Tags', 'simple-catch') . ': ', ', ', '</div>');
  56. } ?>
  57. </footer>
  58. </article><!-- #post-## -->
  59.  
  60. <?php endif;
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement