How Many Files are Needed (3 posts)

  1. mythusmage
    Posted 9 years ago #

    I use the Andreas04 2.0 at Mythusmage Opines. While the theme has three side bars, it has just one sidebar file. That got me to thinking.

    What would be the minimum number of separate files one would need for a WordPress theme? I'm thinking just two, the stylesheet and the index. The look of the theme being set by the two, with skins adding options as in the Sandbox and Jewelry Box themes.

    How would you go about designing and implementing a two file theme?

  2. Drew
    Posted 9 years ago #

    Yes, really the minimum is probably two. The problem, though, would lie in the organizational part. For instance, if you had 7 page templates for various things on your site (God forbid :O). You could have a <div> search block in each page, OR you could make a search.php file and just call it in each page, so that when you update the search page, it updates it on every template that you call it.

    So, the answer is, yes, you can create a template with one index.php and styles.css file. I would not do that if I were you. I actually only have 3 or 4, which is not that much, and some themes have many. It's up to you.

    Hope this has helped.


  3. mythusmage
    Posted 9 years ago #

    Let's say you do have 7 pages in your blog, each with a search function. Wouldn't having each instance where search is called for in one central location simplify updating the call?

Topic Closed

This topic has been closed to new replies.

About this Topic