This is a WordPress Tutorial for Developers Cheat Sheet that should be used by WordPress developers as a WordPress tutorial to get you started developing or tweaking WordPress themes.
Today, WordPress is one of the best content management systems available in market. WordPress provides simplest user interface with great functionalists. WordPress was initially started in 2003 for blogging purpose but thanks to the developers various changes were made to improve its functionality and today WordPress is best to use for simple blogging websites to high end dynamic websites.
WordPress is very simple to work even a new user can work with WordPress without any technical knowledge. WordPress is totally free to use, it is general public licensed. WordPress community provides 24/7 helps to its users.
Why to use WordPress as content management system
WordPress includes many features for providing you fabulous publishing experience. Here we are discussing various features provided by WordPress.
WordPress Tutorial for Developers : Very easy to use
WordPress is very easy to learn and use even user doesn’t have any programming experience. You can start working with WordPress without getting any special training program.
WordPress Tutorial for Developers : Community support
Another advance feature of WordPress is that it is fully supported by WordPress community. A complete support is provided for WordPress and WordPress is downloaded and used by thousands of users since it was introduced in 2003.
WordPress Tutorial for Developers : Manage our site from anywhere
WordPress is a browser based CMS tool so you can use it from anywhere and easily manage your website from any location and any system.
WordPress Tutorial for Developers: Assign multiple users for website
WordPress allow you to assign multiple users to manage your website and all these users can be assigned with different access levels.
GPL licensed
WordPress is general public licensed so you are free to use WordPress for any purpose and anywhere without any cost.
View before you publish
WordPress provides you with facility that you can preview your article before you going to publish it.
Best for search engine optimization
WordPress is best for effective optimization of search engines. You can add images with alternate tests, add videos, power point presentation and info graphic all these tools helps to improve the search engine optimization.
Installing process for WordPress
Minimum requirements for installing WordPress
- PHP version 5.2.4 or grater
- MySQL version 5.0 or greater
- Apache server
Steps for installing the WordPress manually
- Download the WordPress installation package and unzip it.
- Create database on server and user with full access permissions to handle the database.
- Upload the WordPress files on server.
- Follow general instructions during the installation process and you are ready to work with WordPress.
Grate!!!!! You are now ready to work with posts…….
Log In as admin
Now you are ready to work with your website. Just login to your website as administrator with the help of proper username and password options. This login screen is opened by just writing the “wp-admin” after your website name.
After login you will provided with the screen known as dashboard which is main canvas area for showing your creativity. You can manage your full website from this dashboard area.
Creating and publishing the posts
Most important part of dashboard is creating the posts and publishing them. You can add new posts with the options “Add New” post. First of all you have to add the title of your page and then add the contents. You should also add various Medias in post like images, ppt, and videos.
Handling the comments
WordPress provides the ability to visitors of your sites to comment their thoughts about your articles. Comments are very useful because you can directly interact with visitors of your contents. As a administrator you have full access for enabling or disabling the comments for your posts.
All comments are not good!!!!!!
Yes, it is true that not all comments on your articles are not good. Comments provide an area where visitors can links their own websites for gain wattage. You can use some tools like Akismet for protection against the spam.
WordPress Tutorial for Developers – Basic Template Files.
style.css |
Style sheet file |
index.php |
Home Page file |
single.php |
Single post page file |
archive.php |
Archive or Category file |
searchform.php |
Search form file |
search.php |
Search content file |
404.php |
Error page file |
comments.php |
Comments template file |
footer.php |
Footer content file |
header.php |
Header content file |
sidebar.php |
Sidebar content file |
page.php |
Single page file |
WordPress Tutorial for Developers – PHP Snippets for Header.
bloginfo('name'); |
Title of the site |
wp_title(); |
Title of the specific post or page |
get_stylesheet_directory_uri(); |
The style.css file’s location |
bloginfo('pingback_url'); |
Pingback URL for this site |
bloginfo('template_url'); |
Location for the site’s theme files |
bloginfo('version'); |
WordPress version for the site |
bloginfo('atom_url'); |
Atom URL for the site |
bloginfo('rss2_url'); |
RSS2 URL for the site |
get_site_url(); |
Exact URL for the site |
bloginfo('name'); |
Name of the site |
bloginfo('html_type'); |
HTML version of the site |
bloginfo('charset'); |
Charset parameter of the site |
WordPress Tutorial for Developers – PHP Snippets for Templates.
the_content(); |
Content of the posts |
if(have_posts()): |
Check if there are posts |
while(have_posts()): the_post(); |
Shows posts if posts are available |
endwhile; |
Closes the ‘while’ PHP function |
endif; |
Closes the ‘if’ PHP function |
get_header(); |
Header.php file’s content |
get_sidebar(); |
Sidebar.php file’s content |
get_footer(); |
Footer.php file’s content |
the_time('m-d-y'); |
The date in ’08-18-07′ format |
comments_popup_link(); |
Link for the comments on the post |
the_title()'; |
Title of a specific post or page |
the_permalink(); |
URL of a specific post or page |
the_category(); |
Categor of a specific post or page |
the_author(); |
Author of a specific post or page |
the_ID(); |
ID of a specific post or page |
edit_post_link(); |
Link to edit a specific post or page |
get_links_list(); |
Links from the blogroll |
comments_template(); |
Comment PHP file’s content |
wp_list_pages(); |
List of pages of the site |
wp_list_cats(); |
List of categories for the site |
next_post_link('%link'); |
URL to the next post |
previoust_post_link('%link'); |
URL to the previoust post |
get_calendar()' |
The built-in calendar |
wp_get_archives(); |
List of archives for the site |
posts_nav_link(); |
Next and previous post links |
bloginfo('description'); |
Site’s description |
WordPress Tutorial for Developers – Navigation menu.
Category Based Navigation |
<ul id="menu"> |
<li <?php if(is_home()) { ?> class="current-cat" <?php } ?> > |
<a href="<php bloginfo('home'); ?>">Home</a></li> |
<?php wp_list_categories('title_li=&orderby=id'); ?> |
</ul> |
Pages based Navigation |
<ul id="menu"> |
<li <?php if(is_home()) { ?> class="current_page_item" <?php } >>> |
<a href="<php bloginfo('home'); ?>">Home</a></li> |
<?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?> |
</ul> |
WordPress Tutorial for Developers – Extra stuff.
/%postname%/ |
Custom permalinks |
include(TEMPATEPATH . '/x'); |
Include any file |
the_search_query(); |
Value for search form |
_e('Message'); |
Prints out message |
wp_register(); |
Displays the register link |
wp_loginout(); |
Displas the login/logout link |
<!--next page--> |
Divides the content into pages |
<!--more--> |
Cuts off the content and adds a read more link |
wp_meta(); |
Meta for administrators |
timer_stop(1); |
Time to load the page |
echo get_num_queries(); |
Queries to load the page |
WordPress Tutorial for Developers – The Loop.
<php if(have_posts()): ?> |
<php while(have_posts()): the_post(); ?> |
// Post content here (Custom HTML & PHP code) |
<php else; ?> |
<php endif; ?> |
These charts are mainly for WordPress Tutorial for Developers. But you can use these charts to learn some of the basics and improve your skill. It’s pretty handy and comes useful when you are trying to tweak/edit your WordPress blog.
As an newcomer , you don’t need to know about all these coding.