Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function simplecatch_loop() {
- if ( is_page() ): ?>
- <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <header class="entry-header">
- <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
- </header><!-- .entry-header -->
- <div class="entry-content clearfix">
- <?php the_content();
- // copy this <!--nextpage--> and paste at the post content where you want to break the page
- wp_link_pages(array(
- 'before' => '<div class="pagination">Pages: ',
- 'after' => '</div>',
- 'link_before' => '<span>',
- 'link_after' => '</span>',
- 'pagelink' => '%',
- 'echo' => 1
- ) ); ?>
- </div><!-- .entry-content -->
- </article><!-- #post-## -->
- <?php elseif ( is_single() ): ?>
- <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <header class="entry-header">
- <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
- <div class="entry-meta">
- <ul class="clearfix">
- <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' ); ?> <?php the_author_meta( 'display_name' );?></a></li>
- <li class="entry-date updated"><?php echo get_the_date(); ?></li>
- <li><?php comments_popup_link( __( 'No Comments', 'simple-catch' ), __( '1 Comment', 'simple-catch' ), __( '% Comments', 'simple-catch' ) ); ?></li>
- </ul>
- </div>
- </header>
- <div class="entry-content clearfix">
- <?php the_content();
- // copy this <!--nextpage--> and paste at the post content where you want to break the page
- wp_link_pages(array(
- 'before' => '<div class="pagination">Pages: ',
- 'after' => '</div>',
- 'link_before' => '<span>',
- 'link_after' => '</span>',
- 'pagelink' => '%',
- 'echo' => 1
- ) );
- ?>
- </div>
- <footer class="entry-meta">
- <?php
- $tag = get_the_tags();
- if (! $tag ) { ?>
- <div class='tags'><?php _e( 'Categories: ', 'simple-catch' ); ?> <?php the_category(', '); ?> </div>
- <?php } else {
- the_tags( '<div class="tags"> ' . __('Tags', 'simple-catch') . ': ', ', ', '</div>');
- } ?>
- </footer>
- </article><!-- #post-## -->
- <?php endif;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement