Forums

[resolved] Same posts from my homepage are on all of my different pages (20 posts)

  1. nemo-maritime
    Member
    Posted 3 years ago #

    The issue I am having is that if I go to my main page, to see the main list of posts, the first set will show up, but if I try to go to "page 2", or "older" then it still shows the first page posts.

    The most recent posts, 10 as I have it set up, all show up on different pages that are supposed to show older posts. When I click on page 2, or page 3 (I use WP-PageNavi), or "older posts" when I turn WP-PageNavi off, it still shows the same posts on each page. The url of the site changes from example.com to example.com/page/2/ and so on, but the same posts show up. I have tried deactivating all of the plugins for my site, but the issue still persists.

  2. Samuel B
    moderator
    Posted 3 years ago #

    try resetting permalinks
    admin - settings - permalinks

  3. nemo-maritime
    Member
    Posted 3 years ago #

    I went to the permalinks section, and it showed the old "If your .htaccess file were writable, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your .htaccess file. Click in the field and press CTRL + a to select all." And under it showed the .htaccess code,

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    So I copied it over to the .htaccess file in the main folder of the site, and now I just have,

    Options -Indexes
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    But the issue is still happening.

  4. You should still hit save on your permalinks changes (on the Permalinks page) to save it inside WP.

  5. nemo-maritime
    Member
    Posted 3 years ago #

    Tried hitting save, and then uploading again, but same issue. Also tried a different permalinks option, saved, and the issue is still going.

    Also, just in case someone does not get it, I can still see all of my posts. They all open up fine, and their url is right. The issue is browsing to them from the homepage through the, "page 1", "page 2" or the "older posts" way. It wont let me browse the list on the homepage. Just wanted to point that out now.

  6. nemo-maritime
    Member
    Posted 3 years ago #

    Ok.... so I also tried using a different theme, and it looks like the default wp theme works fine. A few of the other themes are kind of messed up, as they only show a few posts, but most of them are fine. The main theme that I have been working around for 4 months now, is one of the themes that looks like (might) be giving me the trouble. Why would it not load the other pages right, but the others would, its just links that it is showing... I tried another theme by the same designer and it worked fine. Looked at the source code and they bothe have the same code in the area for the pagenavi, just one of them wont let me go to another page/s of the post list.

  7. nemo-maritime
    Member
    Posted 3 years ago #

    Also, I have two versions of my theme. One is a free version and one is a premium. I have tried both but it still wont show me posts on the next page, "example.com/page/2/" it shows the same stuff as it did on the main page, the homepage. So how do I get it to show the next page? What am I missing here?

  8. nemo-maritime
    Member
    Posted 3 years ago #

    Dont disappear on my now. Any ideas on how I can fix this?

  9. nemo-maritime
    Member
    Posted 3 years ago #

    *on 'me' now. I found out also that while the link changes in the url the selected page is not changed in the navigation. The navigation on the bottom, where it shows "page 1 2 3" and so on, if I click any of the page numbers, it will change the url, but the button still has page one selected..... same thing with all of the pages, they all change the url but the page is still on page one

  10. Samuel B
    moderator
    Posted 3 years ago #

    hi,
    that sounds more like a theme issue now.
    what happens if you switch temporarily to the default theme?

  11. nemo-maritime
    Member
    Posted 3 years ago #

    If I switch the theme into the default it works fine. It lets me go to older posts and the url works right when I click on different pages. I dont get how it messes it up with the theme, I thought it was all just links.

  12. nemo-maritime
    Member
    Posted 3 years ago #

    Looked again at the site, and like before, some other themes do the "older entries" and "page 1 2 3" and so on right. The theme worked with no problems before. Some of the themes I have tried are made by the same person. Some of the others work, the one I need does not. How can I fix the paging issue so that I can view older posts?

  13. t31os
    Member
    Posted 3 years ago #

    Do you have something like a featured posts block in your theme, if so, try just disabling / removing it and seeing if the problem goes away...

    Or anything that has it's own independant query...

    If removing / disabling sorts the problem, then post the problem code here and we'll see about fixing it... ;)

    I'd wager it being some special block of code with it's own query that's causing the problem...

  14. nemo-maritime
    Member
    Posted 3 years ago #

    I have that feature come with the theme, but I turned it off in the settings. Never used it on my site. The

    I'd wager it being some special block of code with it's own query that's causing the problem...

    part I understand and makes sense. Would the theme still be using the code even if I turned it off? I kind of doubt it because I have had it turned off for a while and the issues started some time ago, but I dont know exactly when because I havent used the "older posts" link in a while

  15. nemo-maritime
    Member
    Posted 3 years ago #

    Do you have something like a featured posts block in your theme, if so, try just disabling / removing it and seeing if the problem goes away...

    Or anything that has it's own independant query...

    To see if there is an independant query, what should I be looking for?

  16. t31os
    Member
    Posted 3 years ago #

    To see if there is an independant query, what should I be looking for?

    Look for..

    query_posts
    or
    new WP_Query

  17. nemo-maritime
    Member
    Posted 3 years ago #

    And this would be in the source code of the site or the index file or some other file?

    I looked into the source code of the site, when its loaded, but dont see anything there, so I am assuming I am wrong as that would/should not be in the source code, unless I'm just confused. At any rate, its not in the source.

    Also, I had anouncements turned on for one of the posts, but that is not the issue either as I have tried turning it off and then on. Plus it all works for other themes as it should when I click "older posts" or "page 1, 2, or 3" or whatever page of posts.

  18. nemo-maritime
    Member
    Posted 3 years ago #

    Ahhhh some good news. So I went into the themes index.php file and I pasted over the original themes index.php content. That fixed the issue. Along the line of messing with it, I must have changed something that I should not have and it screwed everything up. I am now going over the index.php file to see what it is that I changed and see if changing that part will bring everything back. Heres hoping, was going insane with another issue, again ; )

    Edit: Duh!!!! You were right t31os, I had the,

    <?php
       if (is_home()) {
          query_posts("cat=-45, -119");
       }
    ?>

    In my index.php file to block out the categories I did not want on there. Thanks a billion for giving me a direction. If that code does not work, what the heck am I supposed to use to exclude the categories out then? Probably should start another thread for this one

  19. nemo-maritime
    Member
    Posted 3 years ago #

    Got it! Had help from stvwlf. He gave me the following code that fixed it:

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
          query_posts("cat=-45,-119&paged=$paged"); ?>

    Thanks to all of you for your help, especially t31os for getting me close to the issue.

  20. t31os
    Member
    Posted 3 years ago #

    Nice to see you posted the solution, will serve to help anyone else with the same problem(s).

    Glad you got it all working... :)

Topic Closed

This topic has been closed to new replies.

About this Topic