Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

This question already has an answer here:

I have a page named "calientes" with a complex loop that's working perfectly. This page is located at Now I need to use this page as the home page, so I went to "Settings -> Reading" and chose that page as static page.

The problem now is that the pagination no longer works. On the actual page it shows like and it work perfectly! but now it shows as when i really want to go to

I didn't do any other changes, just chose that page as front page basically.

What can i do to made my pagination call

This is my query on my page "Calientes" :

$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;

$args = array(
  'posts_per_page' => 9,
  'paged' => $paged,
  'meta_query' => array(
       'key' => '_wti_like_count',
       'value' => 10,
       'compare' => '>=',
       'type' => 'numeric'

$wp_query = new WP_Query();
$wp_query->query( $args );

if( have_posts() ) : ?>

<?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>

<?php get_template_part( 'content', get_post_format() ); ?>
<?php comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?>

<?php twentytwelve_content_nav( 'nav-below' ); ?>
share|improve this question

marked as duplicate by Chip Bennett, s_ha_dum, tfrommen, toscho Oct 17 '13 at 17:57

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

What is your permalink structure? does it contain a trailing slash? – Milo Oct 17 '13 at 15:25
This is my Permalink Settings : I have the Post Name Activated ... /wordpress/ is my base folder because i'm using instantwp to build my website before uploaded it to my public server! – Oscar Oct 17 '13 at 15:32
If your permalink structure contains a trailing slash, WordPress should enforce the slash on all URLs. The behavior of your front page is correct, the behavior of your calientes page is the one that is wrong. – Milo Oct 17 '13 at 15:37

1 Answer 1

This is perfectly normal. When you set a page as front page WordPress thinks that you want to use the home url for it.

Said that, the url for your calientes page will be your home url ( Now, front pages are not intened to use pagination, so if you put /page/{number} on a fron page it is considered the 'page' query var, not the 'paged', so if you have it as fron page you have to use:

$var = is_front_page() ? 'page' : 'paged';
$paged = ( get_query_var($var) ) ? get_query_var($var) : 1;

However, if you want the url stay (this will became your home url) you need a redirect and do not set 'Calientes' page as home page.

add_action('init', 'calientes_home');

function calientes_home() {
   $fullurl = add_query_arg( array() );
   $url = explode('?', $fullurl);
   $parts = array_filter( explode('/', trim($url[0], '/') ) );
   if ( $parts[0] == 'page' && is_numeric($parts[1]) ) {
     wp_redirect( home_url('/calientes/page/' . $parts[1] ), 301 );
   } elseif( $parts === array() ) {
     wp_redirect( home_url('/calientes/'), 301 );
share|improve this answer
Lets say that i want to be my home page and i want my url stay and when i hit next on my pagination im going to be able to go to ... just like does.. their homepage its and their domain stay it only shows if you click on the menu Hot to go to the Hot's page – Oscar Oct 17 '13 at 16:34
Check out this Example: Go to and go all the way down to their pagination where it says "Mayores" if you hit that button their pagination will take you to because their home page is actually ( "Hot page" ) and their homepage stay That's exactly what i want! – Oscar Oct 17 '13 at 16:46
That sites are not using WordPress ;) However is something doable in Wordpress too, but unfortunely I have to go now... hoping someone else can help you.. @Oscar – gmazzap Oct 17 '13 at 17:19
Please help me out! – Oscar Oct 17 '13 at 18:17
nobody?........ – Oscar Oct 17 '13 at 22:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.