Error permalink page number homepage!
-
Hello all,
I updates WP 4.4.1. But error permalink page number homepage:
https://www.mysite.com/page/2 , https://www.mysite.com/page/3 … always redirect to https://www.mysite.com/Url : https://www.mysite.com/?page=2 … worked
Please help me. Thanks you!Code show page number homepage:
<?php if ($pagination == 'on' && $pagination_type == '') { mom_pagination($query->max_num_pages); } ?>
and pagination.php theme:<?php // Depend On : https://www.kriesi.at/archives/how-to-build-a-wordpress-post-pagination-without-plugin function mom_pagination($pages = '', $range = 3) { global $wp_query; if ( get_query_var('paged') ) { $paged = get_query_var('paged'); } elseif ( get_query_var('page') ) { $paged = get_query_var('page'); } else { $paged = 1; } if (mom_option('pagi_type') == false) { $showitems = ($range * 2)+1; if(empty($paged)) $paged = 1; if($pages == '' && $pages != 0) { global $wp_query; $pages = $wp_query->max_num_pages; if(!$pages) { $pages = 1; } } if(1 != $pages) { echo "<div class='pagination'>"; if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "<a href='".get_pagenum_link(1)."'>«</a>"; if($paged > 1 && $showitems < $pages) echo "<a href='".get_pagenum_link($paged - 1)."'>‹</a>"; for ($i=1; $i <= $pages; $i++) { if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems )) { echo ($paged == $i)? "<span class='current'>".$i."</span>":"<a href='".get_pagenum_link($i)."' class='inactive' >".$i."</a>"; } } if ($paged < $pages && $showitems < $pages) echo "<a href='".get_pagenum_link($paged + 1)."'>›</a>"; if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "<a href='".get_pagenum_link($pages)."'>»</a>"; echo "</div>\n"; } } else { $big = 999999999; // need an unlikely integer echo "<div class='pagination'>"; echo paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?paged=%#%', 'current' => max( 1, $paged ), 'total' => $pages ) ); echo "</div>\n"; } }
Viewing 12 replies - 1 through 12 (of 12 total)
Viewing 12 replies - 1 through 12 (of 12 total)
- The topic ‘Error permalink page number homepage!’ is closed to new replies.