Support » Themes and Templates » Difficulty with a newly created theme: default posts not rendering

  • Resolved AlexMoore


    Hi all,

    I’ve searched extensively to see if anyone else has this problem, and can’t find any direct help on it, so I thought I’d try seeing if anyone can help.

    I’ve been running my own site for a few years now, using a very heavily modified version of a theme to create my own style. This has worked fine but to learn more about creating themes I decided to write one from scratch.

    I’ve done the development on a local deployment with a very minimal database, and everything works absolutely fine on it. I tried to preview the theme on my live server and it didn’t display, but I decided to give it a go at deploying it anyway, and something very odd is happening.

    The setup is as follows:

    – 3 parent pages (an ‘about’, a holding page for articles and a holding page for the posts)
    – Under settings, front page is set to static, and points to the holding page (newsreel)

    index.php is intended for the holding page and any posts that get linked to
    page-articles-front.php is used for the front page to the articles
    page-articles.php is used for all the child article pages
    page-about.php is used for the about page

    Everything works fine, apart from index.php. Instead of parsing the php code and doing it’s magic, it’s instead just ignoring it and pushing it through straight as raw HTML which, naturally, the browser doesn’t do much with.

    Essentially, the default page viewing loop seems broken. And I have no idea why.

    It’s not ideal but I’ll leave the broken theme running for a little while so people can see (just view source when you go to the page)

    Broken page:
    Working page:

    What I’ve already tried:
    1) Tweaking my .htaccess file (it was a bit out of date)
    2) Removing the temporary index.html from the root of the site (added in only for the ‘back in 10 minutes’ sign)
    3) Creating a page template for the newsreel page – this works in that I can get the newsreel page to display as a static page, but not as a blog roll
    4) Adding ‘single.php’ and ‘page.php’ templates (no joy)

    If someone can help, that’d be greatly appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • esmi


    Forum Moderator

    You appear to have some non-printable characters before the opening <?php tag in your theme’s index.php template file. What are you using to edit/create theme files?

    Interesting. I’m using Coda 2, the latest version. It’s not showing anything before the first <?php

    Just checked the file using the wordpress editor, and yeah… it said it was full of utter junk.

    esmi: you’re a genius, thank you (I’ve just spent 2 hours tearing my hair out over this)

    Now fixed.



    Forum Moderator

    Glad I could help 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Difficulty with a newly created theme: default posts not rendering’ is closed to new replies.