I am trying to create a wordpress theme, but I am not able to make the pagination work on the live version. On the localhost it's working just as expected, but on the live version it gives a 404 page each time. I know that there is a lot of answers about this topic, but I was not able to fix my problem. I've already tryed the following topics, among so many others but none of them helped me:
<blockquote>
<ul>
<li><a href="https://stackoverflow.com/questions...-custom-post-type-query?noredirect=1&lq=1">How to include pagination in a Wordpress Custom Post Type Query</a>
</li>
<li><a href="https://stackoverflow.com/questions/41397510/wp-paginate-links-and-query-vars-not-working-wordpress">wp paginate_links and query vars not working Wordpress</a>
</li>
</ul>
</blockquote>
I would like to know if you guys can help me to figure out what I am missing here. I am trying to show my navigation panel at index file(my blog page).
Right now I am using
plugin, but using
functions gives me the same error, but both of them work on localhost. For the paginate link I've used the example from docs:
<blockquote>
<a href="https://codex.wordpress.org/Function_Reference/paginate_links" rel="nofollow noreferrer">https://codex.wordpress.org/Function_Reference/paginate_links</a>.
</blockquote>
Can somenon help me on that, please?
<blockquote>
<ul>
<li><a href="https://stackoverflow.com/questions...-custom-post-type-query?noredirect=1&lq=1">How to include pagination in a Wordpress Custom Post Type Query</a>
</li>
<li><a href="https://stackoverflow.com/questions/41397510/wp-paginate-links-and-query-vars-not-working-wordpress">wp paginate_links and query vars not working Wordpress</a>
</li>
</ul>
</blockquote>
I would like to know if you guys can help me to figure out what I am missing here. I am trying to show my navigation panel at index file(my blog page).
Code:
get_header(); ?>
<div id="primary" class="container">
<main id="main" class="col-xs-12">
<h3 class="title text-center">Notícias:</h3>
<?php
global $wp_query;
query_posts(
array_merge( array(
'post_type' => 'news',
'orderby' => 'date',
'order' => 'DESC',
'posts_per_page' => 3
),$wp_query->query)
);
while($wp_query->have_posts()) :
$wp_query->the_post();
get_template_part('template-parts/content', 'news');
endwhile;
?>
<div class="text-center paginate">
<?php
if(function_exists('wp_paginate')):
wp_paginate();
endif;
?>
</div> <!-- .tect-center / Paginate-->
<?php wp_reset_postdata(); ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php
get_footer();
Code:
Wp-paginate
Code:
paginate_links()
<blockquote>
<a href="https://codex.wordpress.org/Function_Reference/paginate_links" rel="nofollow noreferrer">https://codex.wordpress.org/Function_Reference/paginate_links</a>.
</blockquote>
Can somenon help me on that, please?