Support » Themes and Templates » How to convert my site to my own theme?

  • I started using WordPress on my site a few months ago. I wanted to create a unique look, without a theme, but now I think I need my own custom theme (see reasoning below). So my question is…my site seems to be working fine with WordPress now – how do I convert it to my own theme without breaking it? The site is (things like the about page and lightbox page are static, non-Wordpress pages).

    Here are the steps I followed (this was sort of guess-and-check, which is why it seems random):

    • I started with the theme “Clean Home” since it was, as you might guess from the name, very minimal.
    • I then found that I could use the code <?php define('WP_USE_THEMES', false); get_header(); ?> and bypass the theme. However, it still appears to be using the style.css file that is found in the clean-home directory, so I’ve been making changes to that (so many changes that it’s pretty much a custom style right now) as well as the original style sheet I had been using before I added WordPress. I don’t know why it does this, but the site works and I don’t know how to change it, so I only investigated it for awhile and then gave up and accepted it as it was.
    • I am now realizing that I would like a separate single.php page, among others, because everything is coming up in the same style as my index.php page by default (which is fine for the most part, but I just want to add or change a couple of things, like adding “previous post” and “next post” links). I decided this probably means making my own theme.
    • I took the style.css file, changed the theme info at the top, dropped it into a directory with my current index.php page and put the directory (the-skyline) in the themes folder. Then I activated the theme in my WP dashboard, and I got an error when I went to the index page. (Naive, I know, to think it would be that simple, but figured it was worth a shot). No coding I changed seemed to change the outcome at all.
    • Not knowing how to remove the theme altogether, I just changed the theme in my dashboard to “Clean Home” and now it is back to normal (though still behaving like it did before – not using anything from that theme but the style sheet).

    I’m not a php coder, but usually I can stumble around until I figure stuff out, and this has me baffled.

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


    Forum Moderator

    You might be better off creating a child theme.

    Thanks – I did try both making my own theme and a child theme. Going the child theme route made it so the site didn’t “break,” but it still doesn’t appear to be using the theme. That is to say, the site still looks the same as it did before I went to the child theme, but when I click on a link to a single post page, it still has the same elements as the index page rather than using single.php (which should include things like “Previous Post” “Next Post” etc.). I can’t figure out why it doesn’t appear to be using any other elements from the theme.

    Ian Stewart


    Theme Wrangler

    It’s probably best to develop on your local machine using XAMP or MAMP (software that emulates web server environments on your computer) with error reporting turned on. If you run into an error you’ll usually be directed straight to the line in your files causing trouble.

    Or if you use a plugin like Theme Test Drive you can develop on your new theme — a fork of Clean Home or a child theme — without users seeing the theme you’re developing on. And then activate the new theme when it’s ready.

    I hope that helps get you past the roadblock you’re at.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to convert my site to my own theme?’ is closed to new replies.