Pagination error
-
Hello guys,
My wordpress is installed on http://www.ejaculandocomcontrole.com/blog and I have 2 pagination issues.
1 -> Click on page 2 (bottom of this page http://www.ejaculandocomcontrole.com/blog). It works perfectly. When i try to back to page 1, it redirects to http://www.ejaculandocomcontrole.com, and not to http://www.ejaculandocomcontrole.com/blog.
It should go to http://www.ejaculandocomcontrole.com/page/1 (this page works fine), but wordpress remove /page/1. How can I keep this “/page/1”, or how can i fix this bug?2 -> I search (top of page, search field) any term, like “teste”, and it goes to http://www.ejaculandocomcontrole.com/?s=teste. When i try to go to page 2 (bottom of page), it redirects me to the second page from my home page (http://www.ejaculandocomcontrole.com/page/2/?s=teste) and not to second page from search.
Wordpress configurations:
siteurl = http://www.ejaculandocomcontrole.com/
home = http://www.ejaculandocomcontrole.com/settings -> reading:
Home page: static page
Home page: page “/blog”
Post page: Not selectedpermalink:
post name
plugin Remove Category URL instaledTheme configuration:
Pagination:
Home (“/blog”):
<nav class=”text-center”>
<?php
html5wp_pagination1();
echo ‘ DE ‘.$total;
echo ‘‘;
echo ‘‘;
?>
<div class=”pagination”>
<?php echo html5wp_pagination(); wp_reset_query();?>
</div>
</nav>
Search:
<div class=”pagination”>
<?php html5wp_pagination(); ?>
</div>Functions.php:
// Pagination for paged posts, Page 1, Page 2, Page 3, with Next and Previous Links, No plugin
function html5wp_pagination()
{
global $wp_query;
$big = 999999999;echo paginate_links(array(
‘base’ => str_replace(‘/blog’,”,str_replace($big, ‘%#%’, get_pagenum_link($big))),
‘format’ => ‘?paged=%#%’,
‘current’ => max(1, get_query_var(‘paged’)),
‘total’ => $wp_query->max_num_pages
));}
function html5wp_pagination1()
{
global $wp_query;
$big = 999999999;
//echo $wp_query->max_num_pages;
echo ‘<ul class=”pagination”>’;
echo ‘<li class=”text-only”>PAGINA ‘.max(1, get_query_var(‘paged’));}
This theme works perfectly in my localhost, but don’t work in my webserver.
I tried to install WP-Paginate but it doesn’t work (same problems, only solve first issue because it keeps “/blog” in url).Thank you very much.
- The topic ‘Pagination error’ is closed to new replies.