Forums

[resolved] Theme causes only most current post to display? (6 posts)

  1. ljkerley
    Member
    Posted 2 years ago #

    My blog will only display a) all blog posts or b) the most recent post.
    My blog (at http://www.userelement.com/blog/) includes functions to view recent articles and articles by category. So if I click on the 2nd most recent post, the blog instead shows the most recent post. Strangely, the URLs (in the browser address bar, onmouseover of link) are correct. But the wrong content appears.

    At one point it was suggested that I had problems with my permalinks and .htaccess file. However, we troubleshooted that avenue and the fixes didn't resolve the issue.

    Next, I installed the default theme and another theme as well, and the problem disappeared. So apparently this is a "theme" issue.

    I printed out the code and did line by line comparisons. I made a change here and there to explore little things that might be the problem, and I found nothing.

    I have *n o i d e a* what type of theme-based problem could cause this behaviour. If anyone has an idea what could produce this weird behaviour, please put me out of my misery.

    Also, I have no plug-ins installed

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    My guess is that there's a problem in your category template file (catgeory.php or archive.php).

  3. ljkerley
    Member
    Posted 2 years ago #

    My assumption is that the 'Recent Articles' calls my single.php as opposed to the archive.php or? So even if there were something wrong with my archive.php, the "Recent Articles" navigation would in that case still work, or?
    Looking at the archive.php the frustrating part is that it is for the most part copied from the default. There are minor changes to call my templates, but that is it.
    Here the code: Do you see any likely suspects?

    [Code moderated as per the Forum Rules. Please use a pastebin]

    BTW, I also noticed that the preview function doesn't work in the 2.9.2... I thought it was a bug but the behaviour seems related. Preview only shows the most recent published post. My blog only shows most recent. Could they be related? What would cause the blog to show the most recent post only?

  4. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Yes - the two issues are related and they both point to a problem in your theme.

  5. ljkerley
    Member
    Posted 2 years ago #

    Esmi, it sounds like you know what the problem may be. Can you elaborate, please?
    Also, I checked out pastebin documentation, but when I clicked on the link from the help text (to try to do as asked), I got a 500 server error.

  6. ljkerley
    Member
    Posted 1 year ago #

    Ok, so I found my own solution to this problem.
    My blog has a 3-column format, e.g. #leftSideBar, #postContent, (right)#sidebar. I originally had the navigational functions, e.g. posts by category, by archive date, etc. in the PHP file of leftSideBar, which was a custom template. As soon as I swappped the content of the sidebars so that the navigational functions were in the standard PHP template 'sidebar.php' everything worked.

Topic Closed

This topic has been closed to new replies.

About this Topic