Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Jonathan Grieve
Treehouse Moderator 91,254 PointsWordpress Development Checklist
I'm loving going through the WordPress Development Course and I'm learning bit by bit, just pacing myself rather than trying to take too much in. Because, wow, I'm already a little overwhelmed if appreciative of how much I've taken in so far. I'm certainly more prepared to develop themes than I was just a month or two ago.
So as last weekend drew to a close I had the idea that I could get a WordPress Development checklist started based off of what I've taken in from the Theme Development Course and beyond.
It's not exhaustive or complete by any means, there's bound to be stuff I've missed out so maybe if people want to they could chip in with their own thoughts or additions. It's an idea that may or may not take off, let's see. :)
Installation.
- Purchase of Domain and Hosting.
- Download Wordpress from Wordpress.org (Alternatives: 1 Click installation from cpanel Or 5 minute installation). -> The Famous 5 minute Wordpress Install
- Ensure Wordpress is installed in public_html or www folder.
- See that you have core wordpress files and wp-content, wp-includes and wp-admin folders. [DO NOT add any HTML files to root of installation].
- Set up and install Wordpress on your PCr/Mac for Local WordPress Developer. (MAMP, XAMPP, Desktop Server)
- Configure wp-config.php for localhost database details.
Theme Development Preparation.
- Add files, functions.php style.css, index.php
Minimum Files Required
- style.css - required to use and activate a theme in admin area
- index.php - required to use and activate a theme in admin area
- functions.php
- Screenshot.png - Required to show in themes Repository (880px by 660px)
- Have Static versions of your theme ready in HTML format.
WordPress Core Template Files
- index.php - the main template
- front-page.php - used with static front page
- home.php - fallback Templace file for assigned static front page and posts index page.
- page.php - used for individual "Page Post Type" pages. Not necessarily the home page.
- page-$slug - used for custom individual "Page" Post Type pages
- add php comments to add as a template option in admin area.
- single.php - displays list of posts for "Post" Post Type. home.php can be used as a basis
- single-post.php - displays a single post for "Post" post type
- Template Tags - https://codex.wordpress.org/Template_Tags
To display content on front end of site
- index.php ---> get_header(); the_loop(); get_footer()
- header.php --> wp_title(); wp_head(); body_class(); bloginfo('url');
- sidebar.php (optional) --> get_sidebar();
- footer.php ---> wp_footer();
- in functions.php
wp_enqueue_scripts().
wp_enqueue_styles().
- Beware of jQuery conflicts with WordPress as jQuery is bundled with WP by default.
The Loop.
http://codex.wordpress.org/The_Loop
- The Loop: Syntax:
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); //start the loop ?>
<?php endwhile; else : ?>
<?php endif; ?>
- index.php should contain the loop
Navigation
- req: header.php
- wp_nav_menu();
- add_theme_support('menus'); in functions.php adds support for menus in Wordpress
- register_theme_menus(); in functions.php allows you to manage theme locations in theme.
- add_action('init','register_nav_menus'); //show up as menu location.
Posts/Pages
- Featured images()
- add_theme_support('post-thumbnails'); //add support for featured images in posts/custom post types
Custom Post Types
- Set up post types with Custom Post Types UI and Advanced Custom Fields
- generates a slug.
- single-$posttype.php
- <?php the_field('description');
- <?php the_title('');
Widgets:
- register_sidebar() - http://codex.wordpress.org/Function_Reference/register_sidebar
- get_sidebar() - http://codex.wordpress.org/Function_Reference/get_sidebar
- dynamic_sidebar() - http://codex.wordpress.org/Function_Reference/dynamic_sidebar
- Copy function wpt_create_widget from provided functions.php file.
- function wpt_create_widget ) {
WordPress Codex.
- WordPress Codex
- Theme Development
- Template Files
- The Loop
- Template Tags
- Function Reference
- WP_Query
- WordPress Template Hierarchy
Testing:
- Theme Check Plugin
1 Answer
Anthony c
20,907 PointsThis is a great post.
Maybe somebody with graphic design skills can make an infographic with it.
jag
18,266 Pointsjag
18,266 PointsI'd like to add that for the hosting there are some hosting offers available here:
www.teamtreehouse.com/perks