SlideShare a Scribd company logo
WORDPRESS THEME
Development
From Scratch
ICT MeetUp 2013
By : Chandra Prakash
Thapa
What is a WordPress theme?
A group of templates and a stylesheet that displays content
entered into the database via the WordPress admin.
At a minimum, you need:
 index.php
 style.css
Let’s Start
[ Get Free Responsive Template ]
 Download the brownie template from:
http://www.html5xcss3.com/2012/06/html5-template-
responsive-brownie.html
 Copy and paste the HTML design file to WordPress theme
directory.
[ wp-content/themes/brownie ]
 Rename the index.html to index.php
 Create a style.css file in brownie.
[ wp-content/themes/brownie/style.css ]
style.css
[ Template Settings ]
/*
Theme Name: Brownie.
Theme URI: http://merobox.com/
Description: This is my first WordPress template.
Author: Chandra Prakash Thapa.
Author URI: http://cpthapa.com.np/
Version: 1.0
Tags: brown, two-columns, custom-background,
License:
License URI:
General comments (optional).
*/
Go to Appearance->Themes?
Add screenshot image inside theme folder
[ wp-content/themes/brownie/screenshot.png ]
Visit the site
[ demo ]
Static Link
1. CSS : <link rel="stylesheet" href=“css/style.css" type="text/css" />
2. Script : <script type="text/javascript" src=“js/jquery.min.js"></script>
3. Images : <img src=“images/facebook.png" alt="Facebook">
1. CSS : <link rel="stylesheet" href="<?php bloginfo('template_url');
?>/css/style.css" type="text/css" />
2. Script : <script type="text/javascript" src="<?php bloginfo('template_url');
?>/js/jquery.min.js"></script>
3. Images : <img src="<?php bloginfo('template_url'); ?>/images/facebook.png"
alt="Facebook">
To Dynamic Link
Visit the site
[ again ]
A Basic Theme Requirement
 404.php - Custom “not found” page
 footer.php - The template called with get_footer()
 functions.php - A place to create custom functions, register sidebars, and other settings
 header.php - The template called with get_header()
 index.php - The default template
 home.php - The basic home template
 page.php - Overall template for pages
 search.php - Search results template
 searchform.php - The template called with get_search_form()
 sidebar.php - The template called with get_sidebar()
 single.php - Overall template for single posts
 style.css - The main stylesheet
home.phpindex.php
 Create home.php file.
 Copy all code from index.php to home.php
Break Code Into segments
[home.php]
Header.php
// Add wp_head() function before end of </head> tag.
<?php wp_head (); ?>
</head>
<body>
<header class="header_bg clearfix">
Header.php
// Add title to your website
<title>
<?php bloginfo('name'); // Title of the website ?>
<?php wp_title(); // Title of the single page or post ?>
</title>
Footer.php
// Add wp_footer() function before end of </body> tag.
<?php wp_footer(); ?>
</body>
</html>
Footer Copyright.
[ footer.php ]
 <p>
 &copy;
 <?php echo date('Y'); ?>
 <?php bloginfo('name'); ?>.
 </p>
Home.php
 <?php get_header(); ?>
 Remaining code part.(after excluding header / footer)
 <?php get_footer(); ?>
functions.php
 File is place inside theme folder.
wp-content/themes/yourtheme/functions.php
 Changes default behavior of WordPress.
 Behaves like WordPress Plugin.
 Use it to call PHP or built-in WordPress functions.
 Use to define your own functions.
 Register menu, sidebar and widgets.
Registering Menu
// registering header and footer menu in functions.php file
function merobox_addmenus() {
register_nav_menus(
array(
'header_nav' => 'Header Menu',
'footer_nav' => 'Footer Menu'
)
);
}
add_action('init', 'merobox_addmenus');
A look into menu (3.6 version)
Displaying menu (footer menu)
<div class="menu">
<?php
if (has_nav_menu('footer_nav')) {
wp_nav_menu(
array('theme_location' => 'footer_nav')
);
}
?>
</div>
Displaying menu
[ header menu ]
<?php
if (has_nav_menu('header_nav')) {
wp_nav_menu(
array(
'theme_location' => 'header_nav',
'container' => 'nav',
'container_class' => 'main-menu'
)
);
}
?>
Theme options
 Option Framework add theme options panel.
 http://wordpress.org/plugins/options-framework/
 Download -> Install -> Activate.
Add Options.php
 Download optons.php file from link below :
 https://github.com/devinsays/options-framework-
plugin/blob/master/options-check/options.php
 Add options.php file in the theme folder brownie.
Dynamic text content
Dynamic text
[ option.php ]
 $options[] = array(
 'name' => __('Why Line one', 'options_check'),
 'desc' => __(' Why to choose your business line one.', 'options_check'),
 'id' => 'why_line_one',
 'std' => 'Default Text',
 'type' => 'text‘
 );
Dynamic text display [ home.php]
 Add the following code to display previously added content.
<p>
<?php echo of_get_option('why_line_one'); ?>
</p>
Dynamic Image Slider
[home.php]
 The Query
 The Loop
 Reset Query
Dynamic Image Slider
[ Post Thumbnail Support]
// Add post thumbnails support in functions.php file
add_theme_support( 'post-thumbnails' );
// default thumbnail size for photo gallery
set_post_thumbnail_size( 281, 140, true );
//thumbnail size for image slider
add_image_size( 'image_slide_thumb', 940, 360, true );
Dynamic Image Slider
<ul class="slides">
<?php
$slider_cat = of_get_option('image_slider');
// The Query
query_posts( 'posts_per_page=5&cat='.$slider_cat );
// The Loop
while ( have_posts() ) : the_post();
?>
<li>
<?php the_post_thumbnail('image_slide_thumb',true); ?>
<p class="flex-caption"><?php the_title(); ?></p>
</li>
<?php
endwhile;
// Reset Query
wp_reset_query();
?>
</ul>
Dynamic Image Slider
[ The Query ]
<ul class="slides">
<?php
// The Query
$slider_cat = of_get_option('image_slider');
query_posts( 'posts_per_page=5&cat='.$slider_cat );
[ The Option Panel ]
$options[] = array(
'name' => __('Image Slider', 'options_check'),
'desc' => __('Catgory to use for image slider', 'options_check'),
'id' => 'image_slider',
'type' => 'select',
'options' => $options_categories);
Dynamic Image Slider
[ The Loop ]
// The Loop
while ( have_posts() ) : the_post();
?>
<li>
<?php the_post_thumbnail('image_slide_thumb',true); ?>
<p class="flex-caption"><?php the_title(); ?></p>
</li>
<?php
endwhile;
Dynamic Image Slider
[ Reset Query ]
// Reset Query
wp_reset_query();
?>
</ul>
Featured Content
[home.php]
Featured Content Settings
[ The Option Panel : options.php]
$options[] = array(
'name' => __('Featured Page one', 'options_check'),
'desc' => __('Select the pages to be featured on home page one', 'options_check'),
'id' => 'featured_page_one',
'type' => 'select',
'options' => $options_pages);
Featured Content Display
[ get_post() : home.php]
 <?php
 $pageID = of_get_option('featured_page_one');
 $pageObj = get_post($pageID);
 $pageContent = $pageObj->post_content;
 ?>
 <h3><?php echo $pageObj->post_title; ?></h3>
 </div>
 <p>
 <?php echo substr(strip_tags($pageContent),0,500)."...."; ?>
 <br />
 <a href="<?php echo get_permalink($pageID); ?>">more info</a>
 </p>
Content Type
 Post
- blog, news style content.
- single.php
 Page
- static content like contact us, about us page.
- page.php
single.phpblog_single.html
 Create single.php file.
 Copy all code from blog_single.html to single.php
Post : Single.php
[ blog, news post ]
sidebar.php
header.php - get_header();
footer.php - get_footer();
Post : Single.php
[Demo Post ]
 https://developers.facebook.com/docs/reference/plugins/comments/
Post : single.php
[ The Loop ]
<?php get_header(); ?>
<?php if (have_posts()) :
while(have_posts()) : the_post(); ?>
Title: <?php the_title(); ?>
Published date: <?php the_date('F j, Y'); ?>
Author: <?php the_author_posts_link() ?>
Category: <?php the_category(', '); ?>
Tag: <?php the_tags(','); ?>
Content: <?php the_content(); ?>
<?php endwhile; endif; ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Page : page.php
[ Demo ]
Page : page.php
[ The Loop ]
<?php get_header(); ?>
<?php if (have_posts()) :
while(have_posts()) : the_post(); ?>
Title: <?php the_title(); ?>
Content: <?php the_content(); ?>
<?php endwhile; endif; ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
No Published date:
No Author:
No Category:
No Tag:
No Comment
Custom Page : mycontact.php
<?php
/*
Template Name: My Contact Page
*/
?>
index.phpsingle.php
 Copy all code from single.php to index.php
 Just remove the_content( ) with the_excerpt( )
 And add read more link using the_permalink( );
Index.php
[ default template ]
Sidebars :
Dynamic Widget Ready
[Demo : page, post]
<div class="widget">
<h2><span>Categories</span></h2>
<!– Content Goes here -->
</div>
Sidebars : Dynamic Widget Ready
[ Registering : functions.php]
register_sidebar(
array(
'name' => 'Sidebar',
'id' => 'right-sidebar',
'before_widget' => '<div class="widget">',
'after_widget' => '</div>',
'before_title' => '<h2><span>',
'after_title' => '</span></h2>',
)
);
Sidebars : Dynamic Widget Ready
[ Displaying : sidebar.php]
<div class="sidebar">
<?php
if ( !function_exists('dynamic_sidebar') ||
!dynamic_sidebar('right-sidebar') ) :
endif;
?>
</div>
Extra : Plugin
[ Next Gen Gallery ]
 http://wordpress.org/plugins/nextgen-gallery/
Extra : Plugin
[ Contact Form 7 ]
 http://wordpress.org/plugins/contact-form-7/
Extra : Plugin
[ WP-PageNavi ]
http://wordpress.org/plugins/wp-pagenavi/
Reference
[ For more ]
 http://codex.wordpress.org
 http://www.youtube.com/watch?v=uwecNcdAUaY
 http://line25.com/tutorials/how-to-create-a-simple-wordpress-blog-theme
 http://blog.teamtreehouse.com/responsive-wordpress-bootstrap-theme-tutorial
 http://www.onextrapixel.com/2011/03/08/how-to-code-a-wordpress-3-0-theme-
from-scratch/
 Google.com 
Thank You!
QUESTIONS?
Chandra Prakash Thapa
@cpthapa
cpthapa@gmail.com
cpthapa.com.np
MeroBox.com

More Related Content

What's hot

How to Prepare a WordPress Theme for Public Release
How to Prepare a WordPress Theme for Public ReleaseHow to Prepare a WordPress Theme for Public Release
How to Prepare a WordPress Theme for Public Release
David Yeiser
 
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme Enlightenment
Amanda Giles
 
Introduction to Custom WordPress Themeing
Introduction to Custom WordPress ThemeingIntroduction to Custom WordPress Themeing
Introduction to Custom WordPress Themeing
Jamie Schmid
 
Creating Customizable Widgets for Unpredictable Needs
Creating Customizable Widgets for Unpredictable NeedsCreating Customizable Widgets for Unpredictable Needs
Creating Customizable Widgets for Unpredictable Needs
Amanda Giles
 
Responsive Theme Workshop - WordCamp Columbus 2015
Responsive Theme Workshop - WordCamp Columbus 2015Responsive Theme Workshop - WordCamp Columbus 2015
Responsive Theme Workshop - WordCamp Columbus 2015
Joe Querin
 
Theming 101
Theming 101Theming 101
Theming 101
WinnipegWordcamp
 
Shortcodes vs Widgets: Which one and how?
Shortcodes vs Widgets: Which one and how?Shortcodes vs Widgets: Which one and how?
Shortcodes vs Widgets: Which one and how?
Amanda Giles
 
Customizing WordPress Themes
Customizing WordPress ThemesCustomizing WordPress Themes
Customizing WordPress Themes
Laura Hartwig
 
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
LinnAlexandra
 
WordPress Child Themes
WordPress Child ThemesWordPress Child Themes
WordPress Child Themes
rfair404
 
Demystifying WordPress Conditional Tags
Demystifying WordPress Conditional TagsDemystifying WordPress Conditional Tags
Demystifying WordPress Conditional Tags
WP Pittsburgh Meetup Group
 
Theme development essentials columbus oh word camp 2012
Theme development essentials   columbus oh word camp 2012Theme development essentials   columbus oh word camp 2012
Theme development essentials columbus oh word camp 2012
Joe Querin
 
WordPress Theme Development
WordPress Theme DevelopmentWordPress Theme Development
WordPress Theme Development
WisdmLabs
 
WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1
Yoav Farhi
 
Seven deadly theming sins
Seven deadly theming sinsSeven deadly theming sins
Seven deadly theming sins
George Stephanis
 
Build a WordPress theme from HTML5 template @ Telerik
Build a WordPress theme from HTML5 template @ TelerikBuild a WordPress theme from HTML5 template @ Telerik
Build a WordPress theme from HTML5 template @ Telerik
Mario Peshev
 
Childthemes ottawa-word camp-1919
Childthemes ottawa-word camp-1919Childthemes ottawa-word camp-1919
Childthemes ottawa-word camp-1919
Paul Bearne
 
Cms & wordpress theme development 2011
Cms & wordpress theme development 2011Cms & wordpress theme development 2011
Cms & wordpress theme development 2011
Dave Wallace
 
WordPress Theme Development Basics
WordPress Theme Development BasicsWordPress Theme Development Basics
WordPress Theme Development Basics
Tech Liminal
 
Wordpress theme submission requirement for Themeforest
Wordpress theme submission requirement for ThemeforestWordpress theme submission requirement for Themeforest
Wordpress theme submission requirement for Themeforest
Enayet Rajib
 

What's hot (20)

How to Prepare a WordPress Theme for Public Release
How to Prepare a WordPress Theme for Public ReleaseHow to Prepare a WordPress Theme for Public Release
How to Prepare a WordPress Theme for Public Release
 
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme Enlightenment
 
Introduction to Custom WordPress Themeing
Introduction to Custom WordPress ThemeingIntroduction to Custom WordPress Themeing
Introduction to Custom WordPress Themeing
 
Creating Customizable Widgets for Unpredictable Needs
Creating Customizable Widgets for Unpredictable NeedsCreating Customizable Widgets for Unpredictable Needs
Creating Customizable Widgets for Unpredictable Needs
 
Responsive Theme Workshop - WordCamp Columbus 2015
Responsive Theme Workshop - WordCamp Columbus 2015Responsive Theme Workshop - WordCamp Columbus 2015
Responsive Theme Workshop - WordCamp Columbus 2015
 
Theming 101
Theming 101Theming 101
Theming 101
 
Shortcodes vs Widgets: Which one and how?
Shortcodes vs Widgets: Which one and how?Shortcodes vs Widgets: Which one and how?
Shortcodes vs Widgets: Which one and how?
 
Customizing WordPress Themes
Customizing WordPress ThemesCustomizing WordPress Themes
Customizing WordPress Themes
 
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
 
WordPress Child Themes
WordPress Child ThemesWordPress Child Themes
WordPress Child Themes
 
Demystifying WordPress Conditional Tags
Demystifying WordPress Conditional TagsDemystifying WordPress Conditional Tags
Demystifying WordPress Conditional Tags
 
Theme development essentials columbus oh word camp 2012
Theme development essentials   columbus oh word camp 2012Theme development essentials   columbus oh word camp 2012
Theme development essentials columbus oh word camp 2012
 
WordPress Theme Development
WordPress Theme DevelopmentWordPress Theme Development
WordPress Theme Development
 
WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1
 
Seven deadly theming sins
Seven deadly theming sinsSeven deadly theming sins
Seven deadly theming sins
 
Build a WordPress theme from HTML5 template @ Telerik
Build a WordPress theme from HTML5 template @ TelerikBuild a WordPress theme from HTML5 template @ Telerik
Build a WordPress theme from HTML5 template @ Telerik
 
Childthemes ottawa-word camp-1919
Childthemes ottawa-word camp-1919Childthemes ottawa-word camp-1919
Childthemes ottawa-word camp-1919
 
Cms & wordpress theme development 2011
Cms & wordpress theme development 2011Cms & wordpress theme development 2011
Cms & wordpress theme development 2011
 
WordPress Theme Development Basics
WordPress Theme Development BasicsWordPress Theme Development Basics
WordPress Theme Development Basics
 
Wordpress theme submission requirement for Themeforest
Wordpress theme submission requirement for ThemeforestWordpress theme submission requirement for Themeforest
Wordpress theme submission requirement for Themeforest
 

Viewers also liked

WordCamp TOR: Beyond The Guidelines - Theme Development Best Practices (Vol 1)
WordCamp TOR: Beyond The Guidelines - Theme Development Best Practices (Vol 1)WordCamp TOR: Beyond The Guidelines - Theme Development Best Practices (Vol 1)
WordCamp TOR: Beyond The Guidelines - Theme Development Best Practices (Vol 1)
Chip Bennett
 
Theme Development: From an idea to getting approved to wordpress.org
Theme Development: From an idea to getting approved to wordpress.orgTheme Development: From an idea to getting approved to wordpress.org
Theme Development: From an idea to getting approved to wordpress.org
ThemeHorse
 
Content Management Systems (CMS) & Wordpress theme development
Content Management Systems (CMS) & Wordpress theme developmentContent Management Systems (CMS) & Wordpress theme development
Content Management Systems (CMS) & Wordpress theme development
Dave Wallace
 
Theme development mac
Theme development macTheme development mac
Theme development mac
Lea Ann Irick Williams
 
Geekend 2012 - Jumping Into Tumblr Theme Development
Geekend 2012 - Jumping Into Tumblr Theme DevelopmentGeekend 2012 - Jumping Into Tumblr Theme Development
Geekend 2012 - Jumping Into Tumblr Theme Development
Storyware
 
DrupalEasy: Intro to Theme Development
DrupalEasy: Intro to Theme DevelopmentDrupalEasy: Intro to Theme Development
DrupalEasy: Intro to Theme Development
ultimike
 
Rapid WordPress Theme Development
Rapid WordPress Theme DevelopmentRapid WordPress Theme Development
Rapid WordPress Theme Development
Josh Williams
 
Theme Development
Theme DevelopmentTheme Development
Theme Development
Charles Coursey
 
Better WordPress Theme Development Workflow
Better WordPress Theme Development WorkflowBetter WordPress Theme Development Workflow
Better WordPress Theme Development Workflow
Rajeeb Banstola
 
Drupal Best Practices
Drupal Best PracticesDrupal Best Practices
Drupal Best Practices
manugoel2003
 
Approaches To WordPress Theme Development
Approaches To WordPress Theme DevelopmentApproaches To WordPress Theme Development
Approaches To WordPress Theme Development
Catch Themes
 
Best Practices in Theme Development - WordCamp Orlando 2012
Best Practices in Theme Development - WordCamp Orlando 2012Best Practices in Theme Development - WordCamp Orlando 2012
Best Practices in Theme Development - WordCamp Orlando 2012
Easily Amused, Inc. & The WP Valet
 
Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011
Ryan Price
 
MSP Development Theme
MSP Development ThemeMSP Development Theme
MSP Development Theme
TOPdesk
 

Viewers also liked (14)

WordCamp TOR: Beyond The Guidelines - Theme Development Best Practices (Vol 1)
WordCamp TOR: Beyond The Guidelines - Theme Development Best Practices (Vol 1)WordCamp TOR: Beyond The Guidelines - Theme Development Best Practices (Vol 1)
WordCamp TOR: Beyond The Guidelines - Theme Development Best Practices (Vol 1)
 
Theme Development: From an idea to getting approved to wordpress.org
Theme Development: From an idea to getting approved to wordpress.orgTheme Development: From an idea to getting approved to wordpress.org
Theme Development: From an idea to getting approved to wordpress.org
 
Content Management Systems (CMS) & Wordpress theme development
Content Management Systems (CMS) & Wordpress theme developmentContent Management Systems (CMS) & Wordpress theme development
Content Management Systems (CMS) & Wordpress theme development
 
Theme development mac
Theme development macTheme development mac
Theme development mac
 
Geekend 2012 - Jumping Into Tumblr Theme Development
Geekend 2012 - Jumping Into Tumblr Theme DevelopmentGeekend 2012 - Jumping Into Tumblr Theme Development
Geekend 2012 - Jumping Into Tumblr Theme Development
 
DrupalEasy: Intro to Theme Development
DrupalEasy: Intro to Theme DevelopmentDrupalEasy: Intro to Theme Development
DrupalEasy: Intro to Theme Development
 
Rapid WordPress Theme Development
Rapid WordPress Theme DevelopmentRapid WordPress Theme Development
Rapid WordPress Theme Development
 
Theme Development
Theme DevelopmentTheme Development
Theme Development
 
Better WordPress Theme Development Workflow
Better WordPress Theme Development WorkflowBetter WordPress Theme Development Workflow
Better WordPress Theme Development Workflow
 
Drupal Best Practices
Drupal Best PracticesDrupal Best Practices
Drupal Best Practices
 
Approaches To WordPress Theme Development
Approaches To WordPress Theme DevelopmentApproaches To WordPress Theme Development
Approaches To WordPress Theme Development
 
Best Practices in Theme Development - WordCamp Orlando 2012
Best Practices in Theme Development - WordCamp Orlando 2012Best Practices in Theme Development - WordCamp Orlando 2012
Best Practices in Theme Development - WordCamp Orlando 2012
 
Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011
 
MSP Development Theme
MSP Development ThemeMSP Development Theme
MSP Development Theme
 

Similar to WordPress theme development from scratch : ICT MeetUp 2013 Nepal

How to make a WordPress theme
How to make a WordPress themeHow to make a WordPress theme
How to make a WordPress theme
Hardeep Asrani
 
PSD to WordPress
PSD to WordPressPSD to WordPress
PSD to WordPress
Nile Flores
 
WordPress Theme Workshop: Part 4
WordPress Theme Workshop: Part 4WordPress Theme Workshop: Part 4
WordPress Theme Workshop: Part 4
David Bisset
 
WordPress Theme Design - Rich Media Institute Workshop
WordPress Theme Design - Rich Media Institute WorkshopWordPress Theme Design - Rich Media Institute Workshop
WordPress Theme Design - Rich Media Institute Workshop
Brendan Sera-Shriar
 
20110820 header new style
20110820 header new style20110820 header new style
20110820 header new style
AgentiadeturismInvenio
 
Building Potent WordPress Websites
Building Potent WordPress WebsitesBuilding Potent WordPress Websites
Building Potent WordPress Websites
Kyle Cearley
 
Intro to Plugin Development, Miami WordCamp, 2015
Intro to Plugin Development, Miami WordCamp, 2015Intro to Plugin Development, Miami WordCamp, 2015
Intro to Plugin Development, Miami WordCamp, 2015
topher1kenobe
 
WordPress Theme Workshop: Part 3
WordPress Theme Workshop: Part 3WordPress Theme Workshop: Part 3
WordPress Theme Workshop: Part 3
David Bisset
 
Intro to WordPress Plugin Development
Intro to WordPress Plugin DevelopmentIntro to WordPress Plugin Development
Intro to WordPress Plugin Development
Brad Williams
 
Wordpress Custom Child theme
Wordpress Custom Child themeWordpress Custom Child theme
Wordpress Custom Child theme
YouSaf HasSan
 
Getting started with WordPress development
Getting started with WordPress developmentGetting started with WordPress development
Getting started with WordPress development
Steve Mortiboy
 
Arizona WP - Building a WordPress Theme
Arizona WP - Building a WordPress ThemeArizona WP - Building a WordPress Theme
Arizona WP - Building a WordPress Theme
certainstrings
 
Builing a WordPress Theme
Builing a WordPress ThemeBuiling a WordPress Theme
Builing a WordPress Theme
certainstrings
 
Overview on WordPress theme file structure and working functionality
Overview on WordPress theme file structure and working functionality Overview on WordPress theme file structure and working functionality
Overview on WordPress theme file structure and working functionality
Rakesh Kushwaha
 
Creating Your First WordPress Plugin
Creating Your First WordPress PluginCreating Your First WordPress Plugin
Creating Your First WordPress Plugin
Brad Williams
 
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017
Amanda Giles
 
Word Camp Fukuoka2010
Word Camp Fukuoka2010Word Camp Fukuoka2010
Word Camp Fukuoka2010
YUKI YAMAGUCHI
 
Step by step guide for creating wordpress plugin
Step by step guide for creating wordpress pluginStep by step guide for creating wordpress plugin
Step by step guide for creating wordpress plugin
Mainak Goswami
 
WordPress Theme Workshop: Theme Setup
WordPress Theme Workshop: Theme SetupWordPress Theme Workshop: Theme Setup
WordPress Theme Workshop: Theme Setup
David Bisset
 
Easy Guide to WordPress Theme Integration
Easy Guide to WordPress Theme IntegrationEasy Guide to WordPress Theme Integration
Easy Guide to WordPress Theme Integration
Sankhala Info Solutions
 

Similar to WordPress theme development from scratch : ICT MeetUp 2013 Nepal (20)

How to make a WordPress theme
How to make a WordPress themeHow to make a WordPress theme
How to make a WordPress theme
 
PSD to WordPress
PSD to WordPressPSD to WordPress
PSD to WordPress
 
WordPress Theme Workshop: Part 4
WordPress Theme Workshop: Part 4WordPress Theme Workshop: Part 4
WordPress Theme Workshop: Part 4
 
WordPress Theme Design - Rich Media Institute Workshop
WordPress Theme Design - Rich Media Institute WorkshopWordPress Theme Design - Rich Media Institute Workshop
WordPress Theme Design - Rich Media Institute Workshop
 
20110820 header new style
20110820 header new style20110820 header new style
20110820 header new style
 
Building Potent WordPress Websites
Building Potent WordPress WebsitesBuilding Potent WordPress Websites
Building Potent WordPress Websites
 
Intro to Plugin Development, Miami WordCamp, 2015
Intro to Plugin Development, Miami WordCamp, 2015Intro to Plugin Development, Miami WordCamp, 2015
Intro to Plugin Development, Miami WordCamp, 2015
 
WordPress Theme Workshop: Part 3
WordPress Theme Workshop: Part 3WordPress Theme Workshop: Part 3
WordPress Theme Workshop: Part 3
 
Intro to WordPress Plugin Development
Intro to WordPress Plugin DevelopmentIntro to WordPress Plugin Development
Intro to WordPress Plugin Development
 
Wordpress Custom Child theme
Wordpress Custom Child themeWordpress Custom Child theme
Wordpress Custom Child theme
 
Getting started with WordPress development
Getting started with WordPress developmentGetting started with WordPress development
Getting started with WordPress development
 
Arizona WP - Building a WordPress Theme
Arizona WP - Building a WordPress ThemeArizona WP - Building a WordPress Theme
Arizona WP - Building a WordPress Theme
 
Builing a WordPress Theme
Builing a WordPress ThemeBuiling a WordPress Theme
Builing a WordPress Theme
 
Overview on WordPress theme file structure and working functionality
Overview on WordPress theme file structure and working functionality Overview on WordPress theme file structure and working functionality
Overview on WordPress theme file structure and working functionality
 
Creating Your First WordPress Plugin
Creating Your First WordPress PluginCreating Your First WordPress Plugin
Creating Your First WordPress Plugin
 
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017
 
Word Camp Fukuoka2010
Word Camp Fukuoka2010Word Camp Fukuoka2010
Word Camp Fukuoka2010
 
Step by step guide for creating wordpress plugin
Step by step guide for creating wordpress pluginStep by step guide for creating wordpress plugin
Step by step guide for creating wordpress plugin
 
WordPress Theme Workshop: Theme Setup
WordPress Theme Workshop: Theme SetupWordPress Theme Workshop: Theme Setup
WordPress Theme Workshop: Theme Setup
 
Easy Guide to WordPress Theme Integration
Easy Guide to WordPress Theme IntegrationEasy Guide to WordPress Theme Integration
Easy Guide to WordPress Theme Integration
 

Recently uploaded

Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 

Recently uploaded (20)

Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 

WordPress theme development from scratch : ICT MeetUp 2013 Nepal

  • 1. WORDPRESS THEME Development From Scratch ICT MeetUp 2013 By : Chandra Prakash Thapa
  • 2. What is a WordPress theme? A group of templates and a stylesheet that displays content entered into the database via the WordPress admin. At a minimum, you need:  index.php  style.css
  • 3. Let’s Start [ Get Free Responsive Template ]  Download the brownie template from: http://www.html5xcss3.com/2012/06/html5-template- responsive-brownie.html  Copy and paste the HTML design file to WordPress theme directory. [ wp-content/themes/brownie ]  Rename the index.html to index.php  Create a style.css file in brownie. [ wp-content/themes/brownie/style.css ]
  • 4. style.css [ Template Settings ] /* Theme Name: Brownie. Theme URI: http://merobox.com/ Description: This is my first WordPress template. Author: Chandra Prakash Thapa. Author URI: http://cpthapa.com.np/ Version: 1.0 Tags: brown, two-columns, custom-background, License: License URI: General comments (optional). */
  • 6. Add screenshot image inside theme folder [ wp-content/themes/brownie/screenshot.png ]
  • 8. Static Link 1. CSS : <link rel="stylesheet" href=“css/style.css" type="text/css" /> 2. Script : <script type="text/javascript" src=“js/jquery.min.js"></script> 3. Images : <img src=“images/facebook.png" alt="Facebook"> 1. CSS : <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/css/style.css" type="text/css" /> 2. Script : <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.min.js"></script> 3. Images : <img src="<?php bloginfo('template_url'); ?>/images/facebook.png" alt="Facebook"> To Dynamic Link
  • 10. A Basic Theme Requirement  404.php - Custom “not found” page  footer.php - The template called with get_footer()  functions.php - A place to create custom functions, register sidebars, and other settings  header.php - The template called with get_header()  index.php - The default template  home.php - The basic home template  page.php - Overall template for pages  search.php - Search results template  searchform.php - The template called with get_search_form()  sidebar.php - The template called with get_sidebar()  single.php - Overall template for single posts  style.css - The main stylesheet
  • 11. home.phpindex.php  Create home.php file.  Copy all code from index.php to home.php
  • 12. Break Code Into segments [home.php]
  • 13. Header.php // Add wp_head() function before end of </head> tag. <?php wp_head (); ?> </head> <body> <header class="header_bg clearfix">
  • 14. Header.php // Add title to your website <title> <?php bloginfo('name'); // Title of the website ?> <?php wp_title(); // Title of the single page or post ?> </title>
  • 15. Footer.php // Add wp_footer() function before end of </body> tag. <?php wp_footer(); ?> </body> </html>
  • 16. Footer Copyright. [ footer.php ]  <p>  &copy;  <?php echo date('Y'); ?>  <?php bloginfo('name'); ?>.  </p>
  • 17. Home.php  <?php get_header(); ?>  Remaining code part.(after excluding header / footer)  <?php get_footer(); ?>
  • 18. functions.php  File is place inside theme folder. wp-content/themes/yourtheme/functions.php  Changes default behavior of WordPress.  Behaves like WordPress Plugin.  Use it to call PHP or built-in WordPress functions.  Use to define your own functions.  Register menu, sidebar and widgets.
  • 19. Registering Menu // registering header and footer menu in functions.php file function merobox_addmenus() { register_nav_menus( array( 'header_nav' => 'Header Menu', 'footer_nav' => 'Footer Menu' ) ); } add_action('init', 'merobox_addmenus');
  • 20. A look into menu (3.6 version)
  • 21. Displaying menu (footer menu) <div class="menu"> <?php if (has_nav_menu('footer_nav')) { wp_nav_menu( array('theme_location' => 'footer_nav') ); } ?> </div>
  • 22. Displaying menu [ header menu ] <?php if (has_nav_menu('header_nav')) { wp_nav_menu( array( 'theme_location' => 'header_nav', 'container' => 'nav', 'container_class' => 'main-menu' ) ); } ?>
  • 23. Theme options  Option Framework add theme options panel.  http://wordpress.org/plugins/options-framework/  Download -> Install -> Activate.
  • 24. Add Options.php  Download optons.php file from link below :  https://github.com/devinsays/options-framework- plugin/blob/master/options-check/options.php  Add options.php file in the theme folder brownie.
  • 26. Dynamic text [ option.php ]  $options[] = array(  'name' => __('Why Line one', 'options_check'),  'desc' => __(' Why to choose your business line one.', 'options_check'),  'id' => 'why_line_one',  'std' => 'Default Text',  'type' => 'text‘  );
  • 27. Dynamic text display [ home.php]  Add the following code to display previously added content. <p> <?php echo of_get_option('why_line_one'); ?> </p>
  • 28. Dynamic Image Slider [home.php]  The Query  The Loop  Reset Query
  • 29. Dynamic Image Slider [ Post Thumbnail Support] // Add post thumbnails support in functions.php file add_theme_support( 'post-thumbnails' ); // default thumbnail size for photo gallery set_post_thumbnail_size( 281, 140, true ); //thumbnail size for image slider add_image_size( 'image_slide_thumb', 940, 360, true );
  • 30. Dynamic Image Slider <ul class="slides"> <?php $slider_cat = of_get_option('image_slider'); // The Query query_posts( 'posts_per_page=5&cat='.$slider_cat ); // The Loop while ( have_posts() ) : the_post(); ?> <li> <?php the_post_thumbnail('image_slide_thumb',true); ?> <p class="flex-caption"><?php the_title(); ?></p> </li> <?php endwhile; // Reset Query wp_reset_query(); ?> </ul>
  • 31. Dynamic Image Slider [ The Query ] <ul class="slides"> <?php // The Query $slider_cat = of_get_option('image_slider'); query_posts( 'posts_per_page=5&cat='.$slider_cat ); [ The Option Panel ] $options[] = array( 'name' => __('Image Slider', 'options_check'), 'desc' => __('Catgory to use for image slider', 'options_check'), 'id' => 'image_slider', 'type' => 'select', 'options' => $options_categories);
  • 32. Dynamic Image Slider [ The Loop ] // The Loop while ( have_posts() ) : the_post(); ?> <li> <?php the_post_thumbnail('image_slide_thumb',true); ?> <p class="flex-caption"><?php the_title(); ?></p> </li> <?php endwhile;
  • 33. Dynamic Image Slider [ Reset Query ] // Reset Query wp_reset_query(); ?> </ul>
  • 35. Featured Content Settings [ The Option Panel : options.php] $options[] = array( 'name' => __('Featured Page one', 'options_check'), 'desc' => __('Select the pages to be featured on home page one', 'options_check'), 'id' => 'featured_page_one', 'type' => 'select', 'options' => $options_pages);
  • 36. Featured Content Display [ get_post() : home.php]  <?php  $pageID = of_get_option('featured_page_one');  $pageObj = get_post($pageID);  $pageContent = $pageObj->post_content;  ?>  <h3><?php echo $pageObj->post_title; ?></h3>  </div>  <p>  <?php echo substr(strip_tags($pageContent),0,500)."...."; ?>  <br />  <a href="<?php echo get_permalink($pageID); ?>">more info</a>  </p>
  • 37. Content Type  Post - blog, news style content. - single.php  Page - static content like contact us, about us page. - page.php
  • 38. single.phpblog_single.html  Create single.php file.  Copy all code from blog_single.html to single.php
  • 39. Post : Single.php [ blog, news post ]
  • 41. Post : Single.php [Demo Post ]  https://developers.facebook.com/docs/reference/plugins/comments/
  • 42. Post : single.php [ The Loop ] <?php get_header(); ?> <?php if (have_posts()) : while(have_posts()) : the_post(); ?> Title: <?php the_title(); ?> Published date: <?php the_date('F j, Y'); ?> Author: <?php the_author_posts_link() ?> Category: <?php the_category(', '); ?> Tag: <?php the_tags(','); ?> Content: <?php the_content(); ?> <?php endwhile; endif; ?> <?php get_sidebar(); ?> <?php get_footer(); ?>
  • 44. Page : page.php [ The Loop ] <?php get_header(); ?> <?php if (have_posts()) : while(have_posts()) : the_post(); ?> Title: <?php the_title(); ?> Content: <?php the_content(); ?> <?php endwhile; endif; ?> <?php get_sidebar(); ?> <?php get_footer(); ?> No Published date: No Author: No Category: No Tag: No Comment
  • 45. Custom Page : mycontact.php <?php /* Template Name: My Contact Page */ ?>
  • 46. index.phpsingle.php  Copy all code from single.php to index.php  Just remove the_content( ) with the_excerpt( )  And add read more link using the_permalink( ); Index.php [ default template ]
  • 47. Sidebars : Dynamic Widget Ready [Demo : page, post] <div class="widget"> <h2><span>Categories</span></h2> <!– Content Goes here --> </div>
  • 48. Sidebars : Dynamic Widget Ready [ Registering : functions.php] register_sidebar( array( 'name' => 'Sidebar', 'id' => 'right-sidebar', 'before_widget' => '<div class="widget">', 'after_widget' => '</div>', 'before_title' => '<h2><span>', 'after_title' => '</span></h2>', ) );
  • 49. Sidebars : Dynamic Widget Ready [ Displaying : sidebar.php] <div class="sidebar"> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('right-sidebar') ) : endif; ?> </div>
  • 50. Extra : Plugin [ Next Gen Gallery ]  http://wordpress.org/plugins/nextgen-gallery/
  • 51. Extra : Plugin [ Contact Form 7 ]  http://wordpress.org/plugins/contact-form-7/
  • 52. Extra : Plugin [ WP-PageNavi ] http://wordpress.org/plugins/wp-pagenavi/
  • 53. Reference [ For more ]  http://codex.wordpress.org  http://www.youtube.com/watch?v=uwecNcdAUaY  http://line25.com/tutorials/how-to-create-a-simple-wordpress-blog-theme  http://blog.teamtreehouse.com/responsive-wordpress-bootstrap-theme-tutorial  http://www.onextrapixel.com/2011/03/08/how-to-code-a-wordpress-3-0-theme- from-scratch/  Google.com 
  • 54. Thank You! QUESTIONS? Chandra Prakash Thapa @cpthapa cpthapa@gmail.com cpthapa.com.np MeroBox.com