• Resolved rimma13

    (@rimma13)


    Hi, hopefully one of you can help me. Whenever I click on any categories, or do a search, I can’t seem to go to the older posts. The button is there on my main page, but not on any categories, etc.

    Is there a code I can put to fix this?

    Please help!

    The site is nygossipgirl.com

    Thank you so much in advance!

Viewing 9 replies - 1 through 9 (of 9 total)
  • henkholland

    (@henkholland)

    Ok, check your theme foilder on your server: wp-content/themes/scribblings/
    Is there a category.php and an archive.php in it? They both are missing a nav link like there is in index.php (could also be home.php )

    It is the statement between <div class = "navigation" > and the next </div> Something like:

    <div class="navigation">
    			<div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
    			<div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
    		</div>

    Copy that statement in the same position to your category.php and your archive.php on your server.
    BUT: make a safe copy of both files on your pc before you do anything.

    Thread Starter rimma13

    (@rimma13)

    Hi thanks so much for getting back to me, there is an archive.php, but not a category.php

    The category was already in the sidebar when I switched to the theme, so should I paste that code in the sidebar.php?

    here’s what the html is right now:

    <div class=”menuheader”></div>
    <div class=”menucontent”>
    <h5 class=”menucats”><span>News Categories</span></h5>

      <?php wp_list_categories( ‘title_li=’); ?>

    </div>
    <div class=”menufooter”></div>

    henkholland

    (@henkholland)

    Hey Rimma, cool down. I am in a different timezone (literally).

    Don’t do anything in the sidebar.php

    Just check where the stuff I showed is in index.php and copy it. Next find that spot in archive.php and paste it there. (after making a safe copy of archive.php).

    If that works, do the same with ‘search.php`

    and remember, you have your blog set to display 10 posts so if a category or month does not contain more than 10 posts the bottom link will not show.

    Thread Starter rimma13

    (@rimma13)

    Hey, I didn’t mean to sound pushy at all, I really appreciate your help!

    When you say index, can it be the main index template? Also, I looked at the code for the archive php and I didn’t see any <div class = “navigation” >, so should I enter the code after something else?

    henkholland

    (@henkholland)

    Hi, I meant the bumping (that’s not done here).
    Yes, index.php is often visible as the Main Index Template and (index.php) is written behind it in the WP Appearance Editir screen.

    Hi, it’s all in here: wp-content/themes/scribblings/

    Somewhere in index.php below <?php the_content you will find a couple of lines with content that look like this:

    <div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
    <div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
    </div>

    Class is for how it looks like in the end so if it is there, copy that too.

    Copy it from your own index.php after you noted down how the previous lines look.
    Find those “previous” lines in your archive.php and insert/paste the copied lines there.

    Thread Starter rimma13

    (@rimma13)

    It kind of worked and kind of didn’t. Now there are the older posts, but after every post, instead of just at the bottom of the page

    Thread Starter rimma13

    (@rimma13)

    Never mind, I think I finally got it to work. Thank you soooo much!!!!!

    henkholland

    (@henkholland)

    Great, please mark this topic as Resolved at the right hand side of this page.

    A nice touch would be to add a previous post – next post link (single without the s) at the bottom of a single post.

    That would mean adding a statement to single.php
    More about that here:
    https://codex.www.ads-software.com/Template_Tags/previous_post_link

    I cannot see any of my older posts. My site is https://www.seansabourin.com. When I click page 2 at the bottom of the page the nxt page is just blank. Any help?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Can’t see older posts in categories or searches’ is closed to new replies.