Advertisement
pratikshrestha

Simple Catch Pro update date instead of published date

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