• I’m beyond confused as my blog page will not output posts correctly. Here’s the setup.

    • Using the default theme with my own customizations
    • Front page displays a static page and uses a custom template called home.php
    • Post page is set to ‘Blog’ and uses index.php (or Default Template)
    • All other pages use page.php (or Default Template) and work correctly.
    • index.php has the loop in its default form

    I have two posts, one the default and the other a test. WordPress is displaying these inside <p> tags, header and content included but nothing else.

    The thing that really gets me is it displays this way whether I have the loop active in index.php or not. It doesn’t get the sidebar but it does get the header and footer.

    I’m at a loss for what’s going on and can’t find an answer anywhere so any help is hugely appreciated.

    Let me know if I can further clarify this problem.

Viewing 6 replies - 1 through 6 (of 6 total)
  • URL? Blog Address?

    Thread Starter nimaha

    (@nimaha)

    Sure, here’s the blog address. You can navigate to any other page to see the difference.

    https://www.fitnessinfocus.net/blog

    Thread Starter nimaha

    (@nimaha)

    Activating the default theme fixes the problem so now I’m trying to figure out what it is exactly that is causing the problem in my customized theme.

    So far, I’ve tried comparing the files and haven’t found anything, but I’ll keep looking.

    If anyone has any ideas what to look at, let me know. Thanks.

    test and testing, etc show up. I don’t know where you are in debugging.

    Thread Starter nimaha

    (@nimaha)

    Yeah, the posts show up, but I don’t know how.

    It’s not reading the template file. That is, no matter what template I choose for the blog (Default Template or a custom page template), it displays what you currently see.

    Furthermore, I can type anything I want into index.php or delete the code altogether and the page will still show exactly what you currently see.

    As it is now, there should be h2 tags, the titles should link to the single pages, meta data should show up, etc.

    It seems obvious to me now that when my theme is activated, WordPress is ignoring whatever template I have chosen for that page (in this case, my home page is static so the page ‘blog’ is created to be the blog home page).

    Thread Starter nimaha

    (@nimaha)

    Whew, that was maddening…and really simple in the end.

    Basically, the lesson here is don’t make a template for your static home page and call it home.php.

    I pretty much scorched every file in my WP install to find that out, but it’s all good now.

    The way I figured it out was by copying the default theme and replacing its files one at a time with my own customized files.

    As soon as I uploaded home.php, it broke the blog page. It’s odd because I’ve used that same file name on other sites, but I guess that’s bad practice.

    Probably not too common, but hopefully someone else is spared the trouble I went through in the future.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Blog page mystery output’ is closed to new replies.