Update pagination prev/next labels and positions (#407)

This commit is contained in:
Rami Yushuvaev 2024-05-26 10:54:55 -07:00 committed by GitHub
parent 78d43926bb
commit 45f409db40
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 8 deletions

View file

@ -61,6 +61,7 @@ Source: https://stocksnap.io/photo/4B83RD7BV9
* Fix: Remove page break navigation from archives when using `<!--nextpage-->`
* Fix: Style posts pagination component layout
* Fix: Add RTL support to pagination arrows in archive pages
* Fix: Update pagination prev/next labels and positions ([#404](https://github.com/elementor/hello-theme/issues/404))
* Fix: Check if Elementor is loaded when using dynamic header & footer

= 3.0.1 - 2024-01-24 =

View file

@ -41,17 +41,17 @@ if ( ! defined( 'ABSPATH' ) ) {
<?php
global $wp_query;
if ( $wp_query->max_num_pages > 1 ) :
$next_arrow = is_rtl() ? '&rarr;' : '&larr;';
$prev_arrow = is_rtl() ? '&larr;' : '&rarr;';
$prev_arrow = is_rtl() ? '&rarr;' : '&larr;';
$next_arrow = is_rtl() ? '&larr;' : '&rarr;';
?>
<nav class="pagination">
<div class="nav-previous"><?php
/* translators: %s: HTML entity for arrow character. */
next_posts_link( sprintf( esc_html__( '%s older', 'hello-elementor' ), sprintf( '<span class="meta-nav">%s</span>', $next_arrow ) ) );
previous_posts_link( sprintf( esc_html__( '%s Previous', 'hello-elementor' ), sprintf( '<span class="meta-nav">%s</span>', $prev_arrow ) ) );
?></div>
<div class="nav-next"><?php
/* translators: %s: HTML entity for arrow character. */
previous_posts_link( sprintf( esc_html__( 'newer %s', 'hello-elementor' ), sprintf( '<span class="meta-nav">%s</span>', $prev_arrow ) ) );
next_posts_link( sprintf( esc_html__( 'Next %s', 'hello-elementor' ), sprintf( '<span class="meta-nav">%s</span>', $next_arrow ) ) );
?></div>
</nav>
<?php endif; ?>

View file

@ -47,17 +47,17 @@ if ( ! defined( 'ABSPATH' ) ) {
<?php
global $wp_query;
if ( $wp_query->max_num_pages > 1 ) :
$next_arrow = is_rtl() ? '&rarr;' : '&larr;';
$prev_arrow = is_rtl() ? '&larr;' : '&rarr;';
$prev_arrow = is_rtl() ? '&rarr;' : '&larr;';
$next_arrow = is_rtl() ? '&larr;' : '&rarr;';
?>
<nav class="pagination">
<div class="nav-previous"><?php
/* translators: %s: HTML entity for arrow character. */
next_posts_link( sprintf( esc_html__( '%s older', 'hello-elementor' ), sprintf( '<span class="meta-nav">%s</span>', $next_arrow ) ) );
previous_posts_link( sprintf( esc_html__( '%s Previous', 'hello-elementor' ), sprintf( '<span class="meta-nav">%s</span>', $prev_arrow ) ) );
?></div>
<div class="nav-next"><?php
/* translators: %s: HTML entity for arrow character. */
previous_posts_link( sprintf( esc_html__( 'newer %s', 'hello-elementor' ), sprintf( '<span class="meta-nav">%s</span>', $prev_arrow ) ) );
next_posts_link( sprintf( esc_html__( 'Next %s', 'hello-elementor' ), sprintf( '<span class="meta-nav">%s</span>', $next_arrow ) ) );
?></div>
</nav>
<?php endif; ?>