WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] All posts showing on single.php and archive.php (8 posts)

  1. stml
    Member
    Posted 7 years ago #

    A new theme I'm building suddenly started showing every single post on the single.php and archive.php pages.

    WP knows it's 'supposed' to be a single/archive page because it's showing the correct output in the sidebar (I have multiple conditional options: 'this is a post from...', 'this is the __ category archive' etc.), but it still shows all posts.

    http://the-myths.com/aptstudio/timesemit/

    (Note: this is a test site, and the horizontal lines - if they're there - are for my layout.)

    I'm an experienced WP user and I've never seen this before. Any suggestions? Much appreciated

  2. tsguitar
    Member
    Posted 7 years ago #

    Can you put the content of your Single Post and Archives templates in a pastebin?

  3. stml
    Member
    Posted 7 years ago #

  4. stml
    Member
    Posted 7 years ago #

    (bump)

  5. moshu
    Member
    Posted 7 years ago #

    Remove the Recent posts Loop from the sidebar and see what happens on single.

    BTW, on archive.php ALL POSTS are supposed to show!

  6. tsguitar
    Member
    Posted 7 years ago #

    Yeah, moshu, but all archive pages are showing the same entries, whether it be an archive for July, June, or January.

    stml, in your templates, go with moshu's suggestion, only go one further: remove <?php get_sidebar() ?> entirely. Don't worry about the layout, just do it so we can isolate the problem. In fact, try removing the header and footer call, too. Make sure we've got it pinpointed to a problem with the code in single.php.

    I'm also wondering if this is a problem with some other files you have in folders on your server and/or a problem with permalink settings.

  7. stml
    Member
    Posted 7 years ago #

    Nice one kids - it's the loop in the sidebar that's causing the problem. Thanks so much.

    (Another thread suggested that the permalinks were a problem, but that wasn't it.)

    If I kept a detailed changelog of every single thing I did when developing a theme, this wouldn't happen. I need a global history, like in Photoshop...

    moshu, ts: Thanks again.

  8. moshu
    Member
    Posted 7 years ago #

    Nice one kids
    Hmmm... It was about 50 yrs ago that somebody called me like that, LOL
    Anyway, glad you figured it out.

Topic Closed

This topic has been closed to new replies.

About this Topic