• Resolved MrSerginho

    (@mrserginho)


    Hi there,

    I’m trying to solve this problem for like a month. If you visit emisto.net and go to the bottom of the home page and click on pagenavi page 2, you will see that the link works, but it shows me the posts from first page (home page).

    Please somebody help me. Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • It sounds like your theme’s index.php template file uses a custom query that needs amending.

    Thread Starter MrSerginho

    (@mrserginho)

    So what should i do? I have index.php and also home.php
    Thanks.

    Look in home.php for a query_posts custom query.

    Thread Starter MrSerginho

    (@mrserginho)

    Found this:

    <div id="body">     <!-- Body [sidebar, posts] -->           
    
                <div id="content">     <!-- Contents -->
    
                <?php
    	    $post = $wp_query->post;
    	   	 $id = $wpdb->get_var("SELECT term_id FROM $wpdb->terms WHERE slug='" .get_option('gallery-category') ."'");
    
    	   	   ?>
    
             <?php if (have_posts()) : ?>
    <?php query_posts('cat=-' .$id .''); ?>
    
                    <?php while (have_posts()) : the_post(); ?>

    Try changing:

    <?php query_posts('cat=-' .$id .''); ?>

    to:

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts('cat=-' .$id .'&paged=' . $paged); ?>
    Thread Starter MrSerginho

    (@mrserginho)

    It works, thanks mate.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Pages not working, shows me the home page’ is closed to new replies.