Example #1
0
function lightseek_posts_navigation()
{
    if (function_exists('wp_pagenavi')) {
        wp_pagenavi();
    } else {
        the_posts_navigation();
    }
}
Example #2
0
/**
 * Use WordPress archive pagination.
 *
 * Return a paginated navigation to next/previous set of posts, when
 * applicable. Includes screen reader text for better accessibility.
 *
 * @since  1.0.0
 *
 * @see  the_posts_pagination()
 * @return string Markup for pagination links.
 */
function utility_pro_post_pagination()
{
    $args = array('mid_size' => 2, 'before_page_number' => '<span class="screen-reader-text">' . __('Page', 'utility-pro') . ' </span>');
    if ('numeric' === genesis_get_option('posts_nav')) {
        the_posts_pagination($args);
    } else {
        the_posts_navigation($args);
    }
}
Example #3
0
/**
 * @package ease
 * @subpackage module-onepage
 */
function onePage()
{
    $the_query = new WP_Query(array('post_type' => 'page', 'orderby' => 'menu_order', 'order' => 'ASC'));
    if ($the_query->have_posts()) {
        while ($the_query->have_posts()) {
            $the_query->the_post();
            $content .= "<article id=\"section_" . the_title() . "\">";
            $content .= "<div class=\"entry-content\">";
            $content .= the_content();
            $content .= "</div></article>";
            $content .= the_posts_navigation();
        }
    }
    return $content;
}
Example #4
0
function mdc_posts_navigation()
{
    ?>
  <div class="posts-navigation-wrap">
    <div class="container">
      <?php 
    if (function_exists('wp_pagenavi')) {
        wp_pagenavi();
    } else {
        the_posts_navigation();
    }
    ?>
    </div>
  </div>
  <?php 
}
 /**
  * Posts navigation
  *
  * @since Magzimum 1.0
  *
  */
 function magzimum_custom_posts_navigation()
 {
     $pagination_type = magzimum_get_option('pagination_type');
     switch ($pagination_type) {
         case 'default':
             the_posts_navigation();
             break;
         case 'numeric':
             if (function_exists('wp_pagenavi')) {
                 wp_pagenavi();
             } else {
                 the_posts_navigation();
             }
             break;
         default:
             break;
     }
 }
Example #6
0
 /**
  * Display navigation to next/previous set of posts when applicable.
  */
 function simple_life_paging_nav()
 {
     // Don't print empty markup if there's only one page.
     if ($GLOBALS['wp_query']->max_num_pages < 2) {
         return;
     }
     $pagination_type = esc_attr(simple_life_get_option('pagination_type'));
     switch ($pagination_type) {
         case 'numeric':
             if (function_exists('wp_pagenavi')) {
                 wp_pagenavi();
             } else {
                 the_posts_pagination(array('mid_size' => 2, 'prev_text' => '<span class="meta-nav"><i class="fa fa-chevron-left" aria-hidden="true"></i></span> ' . __('Previous page', 'simple-life'), 'next_text' => __('Next page', 'simple-life') . ' <span class="meta-nav"><i class="fa fa-chevron-right" aria-hidden="true"></i></span>', 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __('Page', 'simple-life') . ' </span>'));
             }
             break;
         case 'default':
             the_posts_navigation(array('prev_text' => '<span class="meta-nav"><i class="fa fa-chevron-left" aria-hidden="true"></i></span> ' . __('Older posts', 'simple-life'), 'next_text' => __('Newer posts', 'simple-life') . ' <span class="meta-nav"><i class="fa fa-chevron-right" aria-hidden="true"></i></span>'));
             break;
         default:
             break;
     }
 }
    ?>
			<?php 
    while (have_posts()) {
        the_post();
        ?>

				<?php 
        get_template_part('template-parts/content');
        ?>

			<?php 
    }
    ?>

			<?php 
    the_posts_navigation(array('prev_text' => 'Older Posts &rarr;', 'next_text' => '&larr; Newer Posts'));
    ?>

		<?php 
} else {
    ?>

			<?php 
    get_template_part('template-parts/content', 'none');
    ?>

		<?php 
}
?>

		</div><!-- #primary -->
Example #8
0
				<div class="container">
					<h1 class="page-title"><?php 
    printf(esc_html__('Search Results for: %s', 'kanec'), '<span>' . get_search_query() . '</span>');
    ?>
</h1>
				</div>
			</header><!-- .page-header -->

			<?php 
    /* Start the Loop */
    while (have_posts()) {
        the_post();
        /**
         * Run the loop for the search to output the results.
         * If you want to overload this in a child theme then include a file
         * called content-search.php and that will be used instead.
         */
        get_template_part('template-parts/content', 'search');
    }
    the_posts_navigation(['prev_text' => '<i class="icon icon-arrow-left"></i> Older posts', 'next_text' => 'Newer posts <i class="icon icon-arrow-right"></i>']);
} else {
    get_template_part('template-parts/content', 'none');
}
?>

		</main><!-- #main -->
	</section><!-- #primary -->

<?php 
get_sidebar();
get_footer();
Example #9
0
				<?php 
        /**
         * Run the loop for the search to output the results.
         * If you want to overload this in a child theme then include a file
         * called content-search.php and that will be used instead.
         */
        get_template_part('template-parts/content', 'search');
        ?>

			<?php 
    }
    ?>

			<?php 
    the_posts_navigation(array('prev_text' => '<span class="material_design_par_amauri_navigate">&#x2770;</span> ' . __('Older posts', 'material-design-par-amauri'), 'next_text' => __('Newer posts', 'material-design-par-amauri') . ' <span class="material_design_par_amauri_navigate">&#x2771;</span>'));
    ?>

		<?php 
} else {
    ?>

			<?php 
    get_template_part('template-parts/content', 'none');
    ?>

		<?php 
}
?>

		</main><!-- #main -->
Example #10
0
    ?>
  <div class="post-list">
    <?php 
    if ($post->post_type == 'post') {
        ?>
      <?php 
        $time_class = 'time-big';
        include locate_template('templates/post-time.php');
        ?>
    <?php 
    }
    ?>
      <?php 
    include locate_template('templates/post-list-article.php');
    ?>
  </div>
<?php 
}
?>
<div class="pagination">
  <?php 
$args = ['prev_text' => '<svg class="prev-page icon-arrow-right" role="img"><use xlink:href="#icon-arrow-right"></use></svg>', 'next_text' => '<svg class="next-page icon-arrow-left" role="img"><use xlink:href="#icon-arrow-left"></use></svg>'];
the_posts_navigation($args);
?>

<?php 
include locate_template('templates/pagination.php');
?>

</div>
Example #11
0
    ?>
			<?php 
    while (have_posts()) {
        the_post();
        ?>

				<?php 
        get_template_part('content', 'search');
        ?>

			<?php 
    }
    ?>

		<?php 
    the_posts_navigation(array('prev_text' => '<span class="meta-nav">&larr;</span> ' . __('Older posts', 'blue-planet'), 'next_text' => __('Newer posts', 'blue-planet') . ' <span class="meta-nav">&rarr;</span>', 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __('Posts navigation', 'blue-planet') . ' </span>'));
    ?>

		<?php 
} else {
    ?>

			<?php 
    get_template_part('content', 'none');
    ?>

		<?php 
}
?>

		</main><!-- #main -->
Example #12
0
				<?php 
        /**
         * Run the loop for the search to output the results.
         * If you want to overload this in a child theme then include a file
         * called content-search.php and that will be used instead.
         */
        get_template_part('content', 'search');
        ?>

			<?php 
    }
    ?>

			<?php 
    the_posts_navigation(array('prev_text' => __('Previous page', 'aaron'), 'next_text' => __('Next page', 'aaron')));
    ?>

			<?php 
    /* If the search is not visible in the menu, and there is only one page of search results, display a search form on the search page. */
    if ($GLOBALS['wp_query']->max_num_pages < 2 && get_theme_mod('aaron_hide_search') != "") {
        echo '<span class="screen-reader-text">' . esc_html__('Would you like to search again?', 'aaron') . '</span><br/>';
        get_search_form();
    }
    ?>


		<?php 
} else {
    ?>
Example #13
0
      </div>
    </div>

    <?php if ( have_posts() ) : ?>

      <?php /* Start the Loop */ ?>
      <?php while ( have_posts() ) : the_post(); ?>

        <?php
          /* Include the Post-Format-specific template for the content.
           * If you want to override this in a child theme, then include a file
           * called content-___.php (where ___ is the Post Format name) and that will be used instead.
           */
          get_template_part( 'content', get_post_format() );
        ?>

      <?php endwhile; ?>

      <?php the_posts_navigation(); ?>

    <?php else : ?>

      <?php get_template_part( 'content', 'none' ); ?>

    <?php endif; ?>

    </main><!-- #main -->
  </div><!-- #primary -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>
				</header>
			<?php 
    }
    ?>

			<?php 
    // Start the loop.
    while (have_posts()) {
        the_post();
        /*
         * Include the Post-Format-specific template for the content.
         * If you want to override this in a child theme, then include a file
         * called content-___.php (where ___ is the Post Format name) and that will be used instead.
         */
        get_template_part('content', get_post_format());
        // End the loop.
    }
    // Previous/next page navigation.
    the_posts_navigation(array('next_text' => '<span class="meta-nav" aria-hidden="true">' . __('Next page:', 'onepixel') . '</span> ' . '<span class="screen-reader-text">' . __('Next page', 'onepixel') . '</span> ' . '<span class="post-title">%title</span>', 'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __('Previous page:', 'onepixel') . '</span> ' . '<span class="screen-reader-text">' . __('Previous page', 'onepixel') . '</span> ' . '<span class="post-title">%title</span>'));
    the_posts_pagination(array('prev_text' => __('Previous page', 'onepixel'), 'next_text' => __('Next page', 'onepixel'), 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __('Page', 'onepixel') . ' </span>'));
    // If no content, include the "No posts found" template.
} else {
    get_template_part('content', 'none');
}
?>

		</main><!-- .site-main -->
	</div><!-- .content-area -->

<?php 
get_footer();
Example #15
0
                <?php 
while (have_posts()) {
    the_post();
    ?>


                    <?php 
    get_template_part('template-parts/content', get_post_format());
    ?>

                    <?php 
    if (!post_password_required() && (comments_open() || get_comments_number())) {
        comments_template();
    }
    the_posts_navigation(array('next_text' => '&larr; %title', 'prev_text' => '%title &rarr;'));
    ?>

                <?php 
}
?>
            </div>

            <div class="col-md-3">

                <?php 
get_sidebar();
?>

            </div>
        </div>
Example #16
0
        if (has_post_thumbnail()) {
            the_post_thumbnail('thumbnail', array('class' => 'search-thumbnail alignright'));
        }
        ?>

					<?php 
        the_excerpt();
        ?>
				</div><!-- .entry-summary -->

			</article><!-- #post-## -->


			<?php 
    }
    the_posts_navigation(array('prev_text' => __('More Results'), 'next_text' => __('Previous Results')));
} else {
    ?>

			<h1 class="search-results-title">
			No results found on <?php 
    echo $displaydomain;
    ?>
 for: 
			<nobr><strong><?php 
    echo get_search_query();
    ?>
</strong></nobr>
			</h1>

		<?php 
Example #17
0
<?php

get_template_part('templates/page', 'header');
?>

<?php 
if (!have_posts()) {
    ?>
    <div class="alert alert-warning">
        <?php 
    _e('Sorry, no results were found.', 'sage');
    ?>
    </div>
    <?php 
    get_search_form();
}
?>

<?php 
while (have_posts()) {
    the_post();
    ?>
    <?php 
    get_template_part('templates/content', 'search');
}
?>

<?php 
the_posts_navigation(['prev_text' => __('More search results', 'sage'), 'next_text' => __('Previous results', 'sage'), 'screen_reader_text' => __('Results navigation', 'sage')]);
Example #18
0
 /**
  * Adds the posts navigation
  *
  * @return 		mixed 			The posts navigation
  */
 public function posts_nav()
 {
     if (!is_search() || !is_home() || !is_archive()) {
         return;
     }
     the_posts_navigation();
 }
Example #19
0
<?php

get_template_part('templates/page', 'header');
?>

<?php 
if (!have_posts()) {
    ?>
  <div class="alert alert-warning">
    <?php 
    _e('Sorry, no results were found.', 'sage');
    ?>
  </div>
  <?php 
    get_search_form();
}
?>

<?php 
while (have_posts()) {
    the_post();
    ?>
  <?php 
    get_template_part('templates/content', get_post_type() != 'post' ? get_post_type() : get_post_format());
}
?>

<?php 
the_posts_navigation(array('prev_text' => __('Older <span class="xdico-rarr"></span>', 'cm'), 'next_text' => __('<span class="xdico-larr"></span> Newer', 'cm')));
    }
    wp_reset_query();
    ?>
			<?php 
} else {
    ?>
				<h2>No posts found</h2>
			<?php 
}
?>

			<?php 
if ($wp_query->max_num_pages > 1) {
    ?>
				<?php 
    the_posts_navigation(array('next_text' => '<span class="meta-nav" aria-hidden="true">' . __('Next:', 'onepixel') . '</span> ' . '<span class="screen-reader-text">' . __('Newer posts &rarr;', 'onepixel') . '</span> ', 'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __('Previous:', 'onepixel') . '</span> ' . '<span class="screen-reader-text">' . __('&larr; Older posts', 'onepixel') . '</span> '));
    ?>
			<?php 
}
?>
		</div>

		<?php 
if (is_active_sidebar('main-sidebar')) {
    ?>
		<?php 
    get_sidebar('main-sidebar');
    ?>
		<?php 
}
?>
Example #21
0
 /**
  * Display navigation to next/previous posts when applicable.
  *
  * @since 1.0.0
  */
 function huesos_content_navigation()
 {
     if (is_singular()) {
         the_post_navigation(array('prev_text' => _x('Previous <span class="screen-reader-text">Post: %title</span>', 'Previous post link', 'huesos'), 'next_text' => _x('Next <span class="screen-reader-text">Post: %title</span>', 'Next post link', 'huesos')));
     } else {
         the_posts_navigation(array('prev_text' => __('Previous', 'huesos'), 'next_text' => __('Next', 'huesos')));
     }
 }
Example #22
0
 /**
  * Posts navigation options
  *
  * @since  Biography 1.0.0
  *
  * @param null
  * @return int
  */
 function biography_posts_navigation()
 {
     the_posts_navigation();
 }
 /**
  * Display navigation to next/previous pages when applicable.
  *
  * @since 1.0.0
  * @uses shrake_post_nav()
  * @uses shrake_paging_nav()
  */
 function shrake_content_navigation()
 {
     if (is_singular()) {
         the_post_navigation(array('prev_text' => _x('<span class="screen-reader-text">Previous Post: %title</span>', 'Previous post link', 'shrake'), 'next_text' => _x('<span class="screen-reader-text">Next Post: %title</span>', 'Next post link', 'shrake')));
     } else {
         the_posts_navigation(array('prev_text' => _x('<span class="screen-reader-text">Previous</span>', 'Previous posts link', 'shrake'), 'next_text' => _x('<span class="screen-reader-text">Next</span>', 'Next posts link', 'shrake')));
     }
 }
Example #24
0
		<header class="page-header">
			<?php 
    the_audiotheme_archive_title('<h1 class="page-title" itemprop="headline">', '</h1>');
    ?>
		</header>

		<?php 
    the_audiotheme_archive_description('<div class="page-content" itemprop="text">', '</div>');
    ?>

		<?php 
    huesos_block_grid(array('classes' => array('block-grid--landscape'), 'columns' => huesos_has_sidebar() ? 2 : 3));
    ?>

		<?php 
    the_posts_navigation(array('prev_text' => __('Next', 'huesos'), 'next_text' => __('Previous', 'huesos')));
    ?>

	<?php 
} else {
    ?>

		<?php 
    get_template_part('audiotheme/parts/content-none', 'record');
    ?>

	<?php 
}
?>

</main>
</h2>
					<p>
						<?php 
    _e('Sorry, but nothing matched your search criteria. Please try again with some different keywords.', 'onepixel');
    ?>
					</p>
				</div>
			<?php 
}
?>

			<?php 
if ($wp_query->max_num_pages > 1) {
    ?>
				<?php 
    the_posts_navigation(array('next_text' => '<span class="meta-nav" aria-hidden="true">' . __('Next:', 'onepixel') . '</span> ' . '<span class="screen-reader-text">' . __('Next search results:', 'onepixel') . '</span> ', 'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __('Previous:', 'onepixel') . '</span> ' . '<span class="screen-reader-text">' . __('Previous search results:', 'onepixel') . '</span> '));
    ?>
			<?php 
}
?>
		</div>
		<?php 
if (is_active_sidebar('main-sidebar')) {
    get_sidebar('main-sidebar');
}
?>
	</div>
</div>

<?php 
get_footer();
Example #26
0
				<?php 
        /*
         * Include the Post-Format-specific template for the content.
         * If you want to override this in a child theme, then include a file
         * called content-___.php (where ___ is the Post Format name) and that will be used instead.
         */
        get_template_part('template-parts/content', get_post_format());
        ?>

			<?php 
    }
    ?>

			<?php 
    the_posts_navigation();
    ?>

		<?php 
} else {
    ?>

			<?php 
    get_template_part('template-parts/content', 'none');
    ?>

		<?php 
}
?>

		</main><!-- #main -->
Example #27
0
<?php

get_template_part('templates/page', 'header');
?>

<?php 
if (!have_posts()) {
    ?>
  <div class="alert alert-warning">
    <?php 
    _e('Nessun risultato trovato.', 'sage');
    ?>
  </div>
  <?php 
    get_search_form();
}
?>

<?php 
while (have_posts()) {
    the_post();
    ?>
  <?php 
    get_template_part('templates/content', 'search');
}
?>

<?php 
the_posts_navigation(array('prev_text' => __('Risultati precedenti', 'sage'), 'next_text' => __('Risultati successivi', 'sage'), 'screen_reader_text' => ' '));