Forum Replies Created

Viewing 3 replies - 16 through 18 (of 18 total)
  • Thread Starter petersandeen

    (@petersandeen)

    Hi jeffreyvr!

    Thank you so much. The code worked. I didn’t know how to “combine” the old code into the new one and therefor implemented it incorrectly.

    Sincerely,
    Peter

    PS. It’s wonderful to see there are so many people willing to help others here.

    Thread Starter petersandeen

    (@petersandeen)

    Thank you for replying.

    I want to make sure I understood correctly. Am I supposed to add “<?php” before the code (and “?>” after it)? If I don’t it just shows up as text in the page. And also did you mean it needs to be put right before these lines?

    <?php query_posts("cat=-1"); ?>
    			<?php if (have_posts()) : ?>
    			<?php while (have_posts()) : the_post(); ?>

    The code you wrote does affect the number of posts per page, but didn’t solve my original problem. Or did I just implement it incorrectly? You mentioned the catid. Did you mean the first line in my loop code?

    I tried removing the first line of the code above (<?php query_posts(“cat=-1”); ?>) but it had no effect. I tried moving your code around the loop code and inside of it, but to no effect (though putting it after the loop code made the index page show the latest post indefinite times).

    Advice is still much appreciated!

    Sincerely,
    Peter

    Thread Starter petersandeen

    (@petersandeen)

    Hi,

    thank you for your reply. Switching to another theme (Twenty Eleven) resolves the problem. I tried deactivating the plugins and even deleted all unused ones, but it didn’t help. I also did the resetting of the plugins folder, but it didn’t help either. So, it seems to be a theme issue.

    Is there something else I could try?

    Here’s the code from the index page that creates the “Next page” button.

    <?php if(function_exists('wp_pagenavi')) {
    		wp_pagenavi();
    	} else {?>
    		<div class="navigation mobileoff"><p><?php posts_nav_link(); ?></p></div>
    		 <?php } ?>
    		<div class="navigation_mobile"><p><?php posts_nav_link(); ?></p></div>

    I also tried the “WP-PageNavi” plugin, but the same result. https://myhappierlife.com/page/2/ is still identical to the first page (meaning it shows the most recent posts instead of going to older posts.

    Any advice is appreciated!

    Sincerely,
    Peter

Viewing 3 replies - 16 through 18 (of 18 total)