Presentation is loading. Please wait.

Presentation is loading. Please wait.

Basics of Administration & Theming - Smarajit Dasgupta.

Similar presentations


Presentation on theme: "Basics of Administration & Theming - Smarajit Dasgupta."— Presentation transcript:

1 Basics of Administration & Theming - Smarajit Dasgupta

2 Brief History Based on blogging platform b2, built in mid-2001 by Michel Valdrighi who seemingly abandoned it after 2 years Fortunately, a b2 fan, Matt Mullenweg developed Wordpress in 2003 23 rd Feb 2011 : Wordpress latest stable version 3.1 released and has already been downloaded 875,950 + times as on Feb 27 th 2011

3 5 minute Install in WAMP Copy Wordpress files into localhost folder Run WAMP. Create database using PHPMyAdmin In WP folder, rename wp-config-sample.php to wp- config.php Open wp-config.php, and edit details : Database name, database user = ‘root’ database password = ‘’ In browser enter http://localhost/site-folder-namehttp://localhost/site-folder-name Fill site info

4 File Structure / wp-admin/ wp-content/ plugins/ Each plugin usually has its own directory themes/ Each theme has its own directory uploads/ Created on first upload (default location) wp-includes/ wp-config.php

5 Wordpress Themes A way to skin Wordpress WordPress themes are a combination of PHP, CSS, and image files Requirements: HTML CSS Some PHP

6 Theme Structure Index.php includes header.php Includes sidebar.php Includes footer.php Homepage index.php home.php Single Post page single.php Page page.php Category category.php archive.php Tags – tag.php Search Results – search.php 404 error – 404.php

7 The Stylesheet - Style.css Defines how HTML will look / controls the layout and design elements of your theme… The comment headers in the style.css provide meta info to WP are are REQUIRED. It defines theme name, creator etc Functions.php Contains theme related functions and commonly is used to generate dynamic sidebars etc. Loop.php If (havePosts) show post stuff Else nothing here! End if

8 Template tags http://codex.wordpress.org/Template_Tags title of a specific post / page URL of a page /post content of posts And more! (continued later)

9 What Is A WordPress Plugin? Plugins are used to add or enhance functionalities of your WordPress site. Example: plugins for contact forms, Over 13,000 plugins available currently http://wordpress.org/extend/plugins/

10 Extra Stuff Custom permalinks /%postname%/ Include any file Title of the site Title of specific page /post Stylesheet location Location of theme file List pages of site Including pages by ID Sorting Pages Adding menu

11 More on Menus To add menu position in functions.php If (function_exists(register_nav_menus)) { register_nav_menus( array( 'primary' => __( 'Primary Navigation', 'twentyten' ), 'secondary' => 'nav2' ) ); } To show menu in template files: ‘nav2’)); ?>


Download ppt "Basics of Administration & Theming - Smarajit Dasgupta."

Similar presentations


Ads by Google