WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Displaying the latest posts instead of single post (8 posts)

  1. suexID
    Member
    Posted 6 years ago #

    Hello guys,

    My main problem is very simple. I've recently installed the WordPress for a university website, and i found that the single post view doesn't works. The single.php is existing and if I write some debug information into it, it appears on that page, but instead of displaying the single page with the comments and so on, only the list of the recent post (just like we're on the main page, or something) are showing up.

    I'm using WordPress 2.2 and Flying on the sun theme.

  2. lukadium
    Member
    Posted 6 years ago #

    I think u can fix the problem by putting "the_permalink()"
    code in your index.php when u want to refer to a single page.

  3. suexID
    Member
    Posted 6 years ago #

    lukadium: This is the way it is, right now. But it doesn't work. The WordPress displays the single post template file, but with the list of the 10 most recent posts and not the specific post I've requested.

  4. suexID
    Member
    Posted 6 years ago #

    This is the single posts template:

    http://www.suexid.hu/jgypk-gyp/?p=38

    And this is the main page:

    http://www.suexid.hu/jgypk-gyp/

    They're all the same, except the big "VAAA" written on the single page! :)

  5. lukadium
    Member
    Posted 6 years ago #

    I think the problem is from ur single.php!
    check it again.

  6. suexID
    Member
    Posted 6 years ago #

    lukadium: In the past I've customized a lot of WP based blogs, and I know a lot of things about it. Trust me, the single.php looks like the way it has to look. I've tried to copy the content of my personal blog's single.php to the place of this single.php and there was no change at all!

    If you'd like to view the single.php's contents, then here it is:
    http://www.suexid.hu/singletemplate.txt

  7. suexID
    Member
    Posted 6 years ago #

    Okay, I have found the solution for my problem, and I will share it with you.

    The problem was not in the single.php file, it was in the sidebar. The theme called a loop in the sidebar to display recent posts and that loop was not closed correctly. So the WordPress core thought that we are requesting the main page even if we tried to access the single post page.

  8. lukadium
    Member
    Posted 6 years ago #

    I'm Glad you managed to fix it, Cheers ;)

Topic Closed

This topic has been closed to new replies.

About this Topic