Created
March 19, 2013 19:45
-
-
Save nateflink/5199461 to your computer and use it in GitHub Desktop.
Why use a Wordpress theme when you can do all the work yourself from scratch? A Bash script to create empty files for all the reserved files for a standard theme, with a comment about what that file does.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo -e "/*\nTheme Name: Custom Theme\nTheme URI: http://codex.wordpress.org/Theme_Development\nDescription: This is a custom theme\nAuthor: Nate Flink\nAuthor URI: http://nateflink.com/\nVersion: 1.0\nTags: custom, theme, awesome\n\nLicense:\nLicense URI:\n\nGeneral comments (optional).\n\nThe main stylesheet. This must be included with your Theme, and it must contain the information header for your Theme.*/" > style.css ;\ | |
echo -e "/*The rtl stylesheet. This will be included automatically if the website's text direction is right-to-left. This can be generated using the the RTLer plugin.*/" > rtl.css ;\ | |
echo -e " <?php /*The main template. If your Theme provides its own templates, index.php must be present. */ ?>" > index.php ;\ | |
echo -e " <?php /*The comments template. */ ?>" > comments.php ;\ | |
echo -e " <?php /*The front page template, it is only used if you use a static front page. */ ?>" > front-page.php ;\ | |
echo -e " <?php /*The home page template, which is the front page by default. If you use a static front page this is the template for the page with the latest posts. */ ?>" > home.php ;\ | |
echo -e " <?php /*The single post template. Used when a single post is queried. For this and all other query templates, index.php is used if the query template is not present. */ ?>" > single.php ;\ | |
echo -e " <?php /*The single post template used when a single post from a custom post type is queried. For example, single-books.php would be used for displaying single posts from the custom post type named "books". index.php is used if the query template for the custom post type is not present. */ ?>" > single-{post-type}.php ;\ | |
echo -e " <?php /*The page template. Used when an individual Page is queried. */ ?>" > page.php ;\ | |
echo -e " <?php /*The category template. Used when a category is queried. */ ?>" > category.php ;\ | |
echo -e " <?php /*The tag template. Used when a tag is queried. */ ?>" > tag.php ;\ | |
echo -e " <?php /*The term template. Used when a term in a custom taxonomy is queried. */ ?>" > taxonomy.php ;\ | |
echo -e " <?php /*The author template. Used when an author is queried. */ ?>" > author.php ;\ | |
echo -e " <?php /*The date/time template. Used when a date or time is queried. Year, month, day, hour, minute, second. */ ?>" > date.php ;\ | |
echo -e " <?php /*The archive template. Used when a category, author, or date is queried. Note that this template will be overridden by category.php, author.php, and date.php for their respective query types. */ ?>" > archive.php ;\ | |
echo -e " <?php /*The search results template. Used when a search is performed. */ ?>" > search.php ;\ | |
echo -e " <?php /*Attachment template. Used when viewing a single attachment. */ ?>" > attachment.php ;\ | |
echo -e " <?php /*Image attachment template. Used when viewing a single image attachment. If not present, attachment.php will be used. */ ?>" > image.php ;\ | |
echo -e " <?php /*The 404 Not Found template. Used when WordPress cannot find a post or page that matches the query. */ ?>" > 404.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment