Sunday, 25 November 2012

Tricks & Tips for Beginners

WordPress can be a frightening lion or a gentle lamb, depending on how much experience you have. This platform gives you the opportunity to incorporate many useful plugins and code to manipulate your website to function exactly how you want. This is the lamb. The lion comes when a beginner opens the files to complete the Five Minute Installation.For WordPress beginners, looking into all the files and code for the first time can be overwhelming - I know this because, not too long ago, I was a newbie to the land of WordPress. It takes time to get accustomed to the way WordPress functions and all of the abilities it offers.
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
*/
?>
The template name is commented out, but WordPress still pulls the name. In your dashboard, create a new page. On the right side, you will see a dropdown for template name. Choose the relevant option.

0 comments:

Post a Comment