• Though I’m a Web developer, I’m relatively new to WordPress. But, I’ve really enjoyed developing a theme for my own site, and I’ve thought about offering this as a service for clients. I am curious, though, about the process.

    If I install WordPress for a client and upload my theme, are there any files I would want to get rid of? (It’s my understanding that some files in the other theme folders act as a “fall back” if you don’t have the equivalent page in your folder. So, I suppose I would want to keep the other themes. Maybe a stupid question, but again, I’m new to this!)

    Any other tips/suggestions would be appreciated. Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • There is no fall back to another theme’s files if your theme doesn’t contain the file. Template Hierarcy does explain what templates are used in various situations.

    Designing_Themes_for_Public_Release is another article that might give you some ideas.

    Congrats on developing that theme!! Don’t forget to give some consideration to submitting the theme to http://wordpress.org/extend/themes/

    Thread Starter Kate

    (@katendarcy)

    Thanks for the advice/information. (On a side note, this quote from the “Designing_Themes_for_Public_Release” article is what I was trying to say:
    “If WordPress can’t ‘find’ the modular part, such as the comment template, it will look for it in the default folder”.
    — Maybe I didn’t explain/undertand it properly. — )

    Also, I had a look at some of the other themes. I’ll consider posting there in the future….

    Thanks again, and have a good day.

    I stand corrected. I see in 2.6.2 there are a number of hardcoded references to themes/default so it would seem unwise to delete the wp-content/themes/default folder or its contents.

    Here’s the references and line numbers:

    wordpress/wp-includes/general-template.php
    00010: load_template( WP_CONTENT_DIR . ‘/themes/default/header.php’);
    00019: load_template( WP_CONTENT_DIR . ‘/themes/default/footer.php’);
    00030: load_template( WP_CONTENT_DIR . ‘/themes/default/sidebar.php’);

    wordpress/wp-includes/comment-template.php
    00671: require( WP_CONTENT_DIR . ‘/themes/default/comments.php’);

    wordpress/wp-admin/includes/upgrade.php
    01121: if (! @copy(WP_CONTENT_DIR . ‘/themes/default/index.php’, “$site_dir/$newfile”))
    01170: $default_dir = WP_CONTENT_DIR . ‘/themes/default’;

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

The topic ‘Custom Theme/Folder Contents’ is closed to new replies.