Support » Themes and Templates » Best practices when creating a new theme

  • I’m about to create my own theme for the first time and
    I’m curious about the best practices for creating a theme. I want the theme to work well even after upgrading to a newer version of WordPress in the future (not having to replace lots of files etc).

    After reading through
    my options seem to be:
    1. To copy the entire default theme to a new directory and edit those files.
    2. To copy only the files I want to change from the default theme, to start with just style.css and index.php
    and edit those.

    What do you suggest? Are there better ways to get started?

    Thanks in advance
    Magnus, Sweden

Viewing 6 replies - 1 through 6 (of 6 total)
  • There is no joy trying to modify the default theme.
    Why not look for a more basic one you would like to mod – looking at layout, style, etc.

    Speaking of best practices, what license is ideal for a public theme release (from the developer’s point of view)?

    But let’s say I just wanna edit a simple one from scratch. Could you recommend a theme that is simple, which I can get started on? I’m not sure how I want my site to look, I just don’t wanna start editing something complex (like the default theme seems to be according to samboll).


    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Honestly, I think the best way to start from scratch is, well, to start from scratch. Look at other themes to get an idea of the more common bits (a lot of the stuff in header.php, for example, rarely changes between different themes), but make it your own. You’ll have a cleaner theme that way than by editing some other one.

    The most basic theme is an index.php and a style.css file. You’ll probably want a header.php, a footer.php, and a sidebar.php, at least. But those are not *required* by any means. They just come in handy to have separated.

    Oh, and add code to support widgets. It’s not hard. Really.

    Thanks Otto, great answer! 🙂
    Could you point me to code for widgets?

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Information about how to widgetize themes can be found here:

    It’s really quite simple to do, and I wish all theme designers would include this support. It doesn’t affect the theme any.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Best practices when creating a new theme’ is closed to new replies.