Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- single.php:
- <?php
- /**
- * The Template for displaying all single posts.
- *
- * @package WordPress
- * @subpackage Pronto
- * @since Pronto 1.0
- */
- get_header(); ?>
- <?php while ( have_posts() ) : the_post(); ?>
- <?php if ( !post_password_required() ) { ?>
- <?php get_template_part('content', get_post_format() ); ?>
- <?php } ?>
- <div id="primary" class="content-area clr">
- <div id="content" class="site-content boxed" role="main">
- <!-- <header class="post-header">
- <h1 class="post-header-title"><?php the_title(); ?></h1>
- <!-- <ul class="meta single-meta clr">
- <?php if ( get_theme_mod('wpex_post_date','1') == '1' ) { ?>
- <li><i class="fa fa-clock-o"></i><?php the_date(); ?></li>
- <?php } ?>
- <?php if ( get_theme_mod('wpex_post_category','1') == '1' ) { ?>
- <li><i class="fa fa-folder-open"></i><?php the_category(' / '); ?></li>
- <?php } ?>
- <!-- <?php if( comments_open() ) { ?>
- <li class="comment-scroll"><i class="fa fa-comment"></i> <?php comments_popup_link(__('Leave a comment', 'wpex'), __('1 Comment', 'wpex'), __('% Comments', 'wpex'), 'comments-link', __('Comments closed', 'wpex')); ?></li>
- <?php } ?>
- <?php if ( get_theme_mod('wpex_post_author','1') == '1' ) { ?>
- <li><i class="fa fa-user"></i><?php the_author_posts_link(); ?></li>
- <?php } ?> ->
- </ul><!-- .meta -->
- </header><!-- .post-header -->
- <article class="entry clr">
- <?php the_content(); ?>
- </article><!-- /entry -->
- <?php wp_link_pages( array( 'before' => '<div class="page-links clr">', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?>
- <?php if ( get_theme_mod('wpex_blog_tags', '1' ) =='1' ) : ?>
- <?php the_tags('<div class="post-tags clr">','','</div>'); ?>
- <?php endif; ?>
- <!-- <?php comments_template(); ?>
- </div><!-- #content -->
- <nav class="single-nav clr">
- <?php next_post_link('<div class="single-nav-left col span_12 clr-margin">%link</div>', '← %title', false); ?>
- <?php previous_post_link('<div class="single-nav-right col span_12">%link</div>', '%title →', false); ?>
- </nav><!-- .page-header-title -->
- </div><!-- #primary -->
- <?php endwhile; ?>
- <?php get_footer(); ?>
- functions/pagination.php:
- <?php
- /**
- * Custom pagination functions
- *
- * @package WordPress
- * @subpackage Pronto
- * @since Pronto 1.0
- */
- // Numbered pagination
- if ( ! function_exists('wpex_pagination') ) {
- function wpex_pagination() {
- global $wp_query;
- $total = $wp_query->max_num_pages;
- $big = 999999999; // need an unlikely integer
- if( $total > 1 ) {
- if( !$current_page = get_query_var('paged') )
- $current_page = 1;
- if( get_option('permalink_structure') ) {
- $format = 'page/%#%/';
- } else {
- $format = '&paged=%#%';
- }
- echo paginate_links(array(
- 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
- 'format' => $format,
- 'current' => max( 1, get_query_var('paged') ),
- 'total' => $total,
- 'mid_size' => 4,
- 'type' => 'list',
- 'prev_text' => '<i class="fa fa-angle-left"></i>',
- 'next_text' => '<i class="fa fa-angle-right"></i>',
- ));
- }
- }
- }
- // Custom page entry pagination function
- if ( !function_exists('wpex_pagejump') ) {
- function wpex_pagejump($pages = '', $range = 4) {
- $showitems = ($range * 2)+1;
- global $paged;
- if ( empty($paged) ) $paged = 1;
- if ( $pages == '' ) {
- global $wp_query;
- $pages = $wp_query->max_num_pages;
- if(!$pages) {
- $pages = 1;
- }
- }
- if ( 1 != $pages ) {
- echo '<div class="post-navigation clr"><div class="alignleft">';
- previous_posts_link( '← ' . __('Newer Posts', 'wpex' ) );
- echo '</div><div class="alignright">';
- next_posts_link( __('Older Posts', 'wpex' ) .' →' );
- echo '</div></div>';
- }
- }
- }
- // Infinite Scroll
- if ( !function_exists( 'wpex_infinite_scroll' ) ) {
- function wpex_infinite_scroll( $type = 'standard' ) {
- // Output pagination HTML
- $output = '';
- $output .= '<div class="infinite-scroll-nav clr">';
- $output .= '<div class="alignleft newer-posts">';
- $output .= get_previous_posts_link('← '. __( 'Newer Posts', 'wpex' ) );
- $output .= '</div>';
- $output .= '<div class="alignright older-posts">';
- $output .= get_next_posts_link( __( 'Older Posts', 'wpex' ) .' →');
- $output .= '</div>';
- $output .= '</div>';
- echo $output;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement