To use WordPress, a general knowledge of PHP is needed, but you don't have to be an expert. Below is a list of the most used and needed WordPress code, plugins and functions to get you started. They've been created with examples and use real scenarios to help you understand the process.
(All solutions reference code from WordPress 3.2.1)
Helpful Code Snippets
Theme v. Template
Problem: I don't understand the different between a theme and a template.Solution: A theme is the folder that holds all of your files. For example, the new WordPress theme is TwentyEleven.
Many people start with the theme that comes with the WordPress.org download and build upon that. You can rename the folder to be the name of your site, the version number, etc. At the top of your stylesheet
style.css, you can change the name as well. This will help you identify what theme you're using if you have several options.A template is one file instead of a folder. A page that almost always has its own template is the homepage. To make a template, create a new file inside your theme. Avoid using
home.php because WordPress has already set this page up in its functions. Use home-template.php, homepage.php, etc.At the top of your template put this code:
<?
/*
Template Name: Home
*/
?>

0 comments:
Post a Comment