SlideShare a Scribd company logo
1 of 22
Download to read offline
THEME DEVELOPMENT IN
WORDPRESS
By:
Junejo Naeem Ahmed
WHY WORDPRESS THEMES?
• To create a unique look for your WordPress site .
• To take advantage of templates, template tags, and
the WordPress Loop to generate different website
results and looks .
• To provide alternative templates for specific site
features, such as category pages and search result
pages .
• To quickly switch between two site layouts, or to take
advantage of a Theme or style switcher to allow site
owners to change the look of your site .
A WORDPRESS THEME HAS MANY BENEFITS, TOO .
• It separates the presentation styles and template
files from the system files so the site will upgrade
without drastic changes to the visual presentation of
the site.
• It allows for customization of the site functionality
unique to that Theme.
• It allows for quick changes of the visual design and
layout of a WordPress site.
• It removes the need for a typical WordPress site
owner to have to learn CSS, HTML, and PHP in order
to have a great-looking website .
WHY SHOULD YOU BUILD YOUR OWN WORDPRESS
THEME? THAT'S THE REAL QUESTION.

• It's an opportunity to learn more about
CSS, HTML, and PHP.
• It's an opportunity to put your expertise with
CSS, HTML, and PHP to work.
• It's creative.
• It's fun (most of the time).
• If you release it to the public, you can feel
good that you shared and gave something
back to the WordPress Community
THEME DEVELOPMENT STANDARDS
• WordPress Themes should be coded using the
following standards:
• Use well-structured, error-free PHP and valid
HTML. ( WordPress Coding Standards ).
• Use clean, valid CSS. ( CSS Coding Standards ).
• Follow design guidelines in Site Design and
Layout .
ANATOMY OF A THEME
• WordPress Themes live in subdirectories of the WordPress
themes directory (wp-content/themes/ by default).
• The Theme's subdirectory holds all of the Theme's stylesheet
files, template files, and optional functions file
(functions.php), JavaScript files, and images.
• For example, a Theme named "test" would reside in the
directory wp-content/themes/test/.
• Avoid using numbers for the theme name, as this prevents it
from being displayed in the available themes list.
• WordPress includes a default theme in each new installation.
Examine the files in the default theme carefully to get a better
idea of how to build your own Theme files.
THEME STYLESHEET
• In addition to CSS style information for your theme, style.css
provides details about the Theme in the form of comments.
• The stylesheet must provide details about the Theme in the
form of comments.
• No two Themes are allowed to have the same details listed in
their comment headers.
• If you make your own Theme by copying an existing one,
make sure you change this information first.
THEME STYLESHEET (Cont’d)
FUNCTIONS FILE
• A theme can optionally use a functions file, which resides in
the theme subdirectory and is named functions.php.
• This file basically acts like a plugin, and if it is present in the
theme you are using, it is automatically loaded during
WordPress initialization (both for admin pages and external
pages).
• Enable Theme Features such as Sidebars, Navigation
Menus, Post Thumbnails, Post Formats, Custom
Headers, Custom Backgrounds and others.
• Set up an options menu, giving site owners options for
colors, styles, and other aspects of your theme.
WHAT IS A TEMPLATE TAG
• A template tag is code that instructs WordPress to
"do" or "get" something.
• In the case of the header.php template tag for your
WordPress site's name, it looks like this:
• <h1><?php bloginfo('name'); ?></h1>
TEMPLATE TAG -bloginfo
• Displays information about your site, mostly gathered from
the information you supply in your User Profile and General
Settings WordPress Administration Screens.
• It can be used anywhere within a template file.
• This always prints a result to the browser.
• If you need the values for use in PHP, use get_bloginfo().

• Usage
– <?php bloginfo( $show ); ?>

• Parameters
– $show(string) (Optional) Keyword naming the information you want.
– Default: name
HOW TO PASS TAG PARAMETERS
• like PHP functions, many template tags accept arguments, or
parameters.
• Template tag parameters are variables you can use to change
a tag's output or otherwise modify its action in some way.
• Tags without parameters
• Tags with PHP function-style parameters
– Some functions take multiple parameters.
– Multiple parameters are separated by commas.
– The order of parameters is important!

• Tags with query-string-style parameters
INCLUDE TAGS
• The Template include tags are used within one Template file
to execute the HTML and PHP found in another template file.
• Include Generic Files
–
–
–
–

get_header()
get_footer()
get_sidebar()
get_template_part()

• Include Other Components
– get_search_form()
– comments_template()
CONDITIONAL TAGS
• All of the Conditional Tags test to see whether a certain
condition is met, and then returns either TRUE or FALSE.
–
–
–
–

Is_home()
Is_single();
Is_admin();
Is_category();
HOW WORDPRESS WORKS
• Visitors requests initial WordPress page: index.php
• WordPress activates themes
• WordPress checks to see which template files are
present
• Gathers settings stored in database
• Retrieves specified number of most recent posts
• Stores post data
(title, author, content, comments, etc.) in variables
• Outputs data into theme page
BASIC WORDPRESS THEME PAGE STRUCTURE AND ELEMENTS

•
•
•
•
•
•

Header (header.php)
Main content (index.php)
Sidebar with Widget (sidebar.php)
Footer (footer.php)
CSS (style.css)
The stylesheet called style.css, which controls the
presentation (visual design and layout) of the
website pages.
ANATOMY OF A THEME
THE LOOP
• The Loop is PHP code used by WordPress to display
posts.
• Using The Loop, WordPress processes each post to
be displayed on the current page, and formats it
according to how it matches specified criteria within
The Loop tags.
• Any HTML or PHP code in the Loop will be processed
on each post.
THE LOOP: VISIUAL MODEL
ADDITIONAL WORDPRESS TEMPLATE FILES
•
•
•
•
•

Archive (archive.php)
Custom Page (page.php)
Single Post (single.php)
Comments (comments.php)
Search Results (search.php)
THE ARCHIVE TEMPATE FILE
•
•
•
•
•
•
•
•

archive.php
Fall back for 6 different page types:
Author
Tag
Category
Taxonomy
Date
Archives
THE CUSTOM PAGE TEMPATE FILE
• page.php
• Used to create all custom pages
• Additional custom page template can be created

More Related Content

What's hot

Html5 and-css3-overview
Html5 and-css3-overviewHtml5 and-css3-overview
Html5 and-css3-overviewJacob Nelson
 
Introduction of wordpress, Wordpress Training Ahmedabad, Wordpress Class Ahme...
Introduction of wordpress, Wordpress Training Ahmedabad, Wordpress Class Ahme...Introduction of wordpress, Wordpress Training Ahmedabad, Wordpress Class Ahme...
Introduction of wordpress, Wordpress Training Ahmedabad, Wordpress Class Ahme...NicheTech Com. Solutions Pvt. Ltd.
 
An Introduction to CSS Frameworks
An Introduction to CSS FrameworksAn Introduction to CSS Frameworks
An Introduction to CSS FrameworksAdrian Westlake
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTMLAjay Khatri
 
Introduction to Wordpress
Introduction to WordpressIntroduction to Wordpress
Introduction to WordpressReuben Rock
 
Introduction to XMLUI and Mirage Theming for DSpace 3
Introduction to XMLUI and Mirage Theming for DSpace 3Introduction to XMLUI and Mirage Theming for DSpace 3
Introduction to XMLUI and Mirage Theming for DSpace 3Bram Luyten
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSSMario Hernandez
 
Web development using HTML and CSS
Web development using HTML and CSSWeb development using HTML and CSS
Web development using HTML and CSSSiddhantSingh980217
 
Beginners PHP Tutorial
Beginners PHP TutorialBeginners PHP Tutorial
Beginners PHP Tutorialalexjones89
 
Front-End Frameworks: a quick overview
Front-End Frameworks: a quick overviewFront-End Frameworks: a quick overview
Front-End Frameworks: a quick overviewDiacode
 
Sass - Getting Started with Sass!
Sass - Getting Started with Sass!Sass - Getting Started with Sass!
Sass - Getting Started with Sass!Eric Sembrat
 

What's hot (20)

HTML5 Tutorial
HTML5 TutorialHTML5 Tutorial
HTML5 Tutorial
 
Html5 and-css3-overview
Html5 and-css3-overviewHtml5 and-css3-overview
Html5 and-css3-overview
 
HTML & CSS.ppt
HTML & CSS.pptHTML & CSS.ppt
HTML & CSS.ppt
 
Introduction of wordpress, Wordpress Training Ahmedabad, Wordpress Class Ahme...
Introduction of wordpress, Wordpress Training Ahmedabad, Wordpress Class Ahme...Introduction of wordpress, Wordpress Training Ahmedabad, Wordpress Class Ahme...
Introduction of wordpress, Wordpress Training Ahmedabad, Wordpress Class Ahme...
 
An Introduction to CSS Frameworks
An Introduction to CSS FrameworksAn Introduction to CSS Frameworks
An Introduction to CSS Frameworks
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
Introduction to Wordpress
Introduction to WordpressIntroduction to Wordpress
Introduction to Wordpress
 
HTML X CSS
HTML X CSSHTML X CSS
HTML X CSS
 
Introduction to XMLUI and Mirage Theming for DSpace 3
Introduction to XMLUI and Mirage Theming for DSpace 3Introduction to XMLUI and Mirage Theming for DSpace 3
Introduction to XMLUI and Mirage Theming for DSpace 3
 
WordPress as a CMS
WordPress as a CMSWordPress as a CMS
WordPress as a CMS
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
Web development using HTML and CSS
Web development using HTML and CSSWeb development using HTML and CSS
Web development using HTML and CSS
 
CSS
CSSCSS
CSS
 
Beginners PHP Tutorial
Beginners PHP TutorialBeginners PHP Tutorial
Beginners PHP Tutorial
 
CSS Introduction
CSS IntroductionCSS Introduction
CSS Introduction
 
CSS
CSSCSS
CSS
 
Web Development
Web DevelopmentWeb Development
Web Development
 
Front-End Frameworks: a quick overview
Front-End Frameworks: a quick overviewFront-End Frameworks: a quick overview
Front-End Frameworks: a quick overview
 
CSS Grid Layout na prática
CSS Grid Layout na práticaCSS Grid Layout na prática
CSS Grid Layout na prática
 
Sass - Getting Started with Sass!
Sass - Getting Started with Sass!Sass - Getting Started with Sass!
Sass - Getting Started with Sass!
 

Similar to Wordpress theme development

Wordpress template hierarchy
Wordpress template hierarchyWordpress template hierarchy
Wordpress template hierarchyStockton Group
 
Starting WordPress Theme Review
Starting WordPress Theme ReviewStarting WordPress Theme Review
Starting WordPress Theme ReviewCatch Themes
 
Word press bootcamp By Sourcescript Innovations and Mentors Dojo
Word press bootcamp  By Sourcescript Innovations and Mentors DojoWord press bootcamp  By Sourcescript Innovations and Mentors Dojo
Word press bootcamp By Sourcescript Innovations and Mentors Dojolightshire
 
WordPress Themes and Plugins
WordPress Themes and PluginsWordPress Themes and Plugins
WordPress Themes and Pluginssuperann
 
WCBos13 intermediate workshop
WCBos13 intermediate workshopWCBos13 intermediate workshop
WCBos13 intermediate workshopBoston WordPress
 
Introduction to Custom WordPress Themeing
Introduction to Custom WordPress ThemeingIntroduction to Custom WordPress Themeing
Introduction to Custom WordPress ThemeingJamie Schmid
 
Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016David Brattoli
 
Newbies guide to customizing word press themes 25
Newbies guide to customizing word press themes 25Newbies guide to customizing word press themes 25
Newbies guide to customizing word press themes 25New Tricks
 
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.orgThemeHorse
 
How to get your theme in WordPress
How to get your theme in WordPressHow to get your theme in WordPress
How to get your theme in WordPressNisha Singh
 
Anatomy of a Wordpress theme
Anatomy of a Wordpress themeAnatomy of a Wordpress theme
Anatomy of a Wordpress themeDave Wallace
 
Keeping Your Themes and Plugins Organized.
Keeping Your Themes and Plugins Organized.Keeping Your Themes and Plugins Organized.
Keeping Your Themes and Plugins Organized.Jacob Martella
 
Writing a WordPress Theme - HighEdWeb 2013 #WRK2
Writing a WordPress Theme - HighEdWeb 2013 #WRK2Writing a WordPress Theme - HighEdWeb 2013 #WRK2
Writing a WordPress Theme - HighEdWeb 2013 #WRK2Curtiss Grymala
 
American University WordPress Theming Lecture
American University WordPress Theming LectureAmerican University WordPress Theming Lecture
American University WordPress Theming LectureAaron Brazell
 
Intro To WordPress Themes
Intro To WordPress ThemesIntro To WordPress Themes
Intro To WordPress Themesdamonsharp
 
MCC Web Design Workshop
MCC Web Design WorkshopMCC Web Design Workshop
MCC Web Design WorkshopFaye Tandog
 
Submitting to the WordPress Theme Directory
Submitting to the WordPress Theme DirectorySubmitting to the WordPress Theme Directory
Submitting to the WordPress Theme DirectoryAnthony Hortin
 
Websites With Wordpress
Websites With WordpressWebsites With Wordpress
Websites With WordpressCharly Leetham
 
WordPress Template hierarchy
WordPress Template hierarchyWordPress Template hierarchy
WordPress Template hierarchyJason Yingling
 
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slides
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slidesKeep Your Code Organized! WordCamp Montreal 2013 Presentation slides
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slidesJer Clarke
 

Similar to Wordpress theme development (20)

Wordpress template hierarchy
Wordpress template hierarchyWordpress template hierarchy
Wordpress template hierarchy
 
Starting WordPress Theme Review
Starting WordPress Theme ReviewStarting WordPress Theme Review
Starting WordPress Theme Review
 
Word press bootcamp By Sourcescript Innovations and Mentors Dojo
Word press bootcamp  By Sourcescript Innovations and Mentors DojoWord press bootcamp  By Sourcescript Innovations and Mentors Dojo
Word press bootcamp By Sourcescript Innovations and Mentors Dojo
 
WordPress Themes and Plugins
WordPress Themes and PluginsWordPress Themes and Plugins
WordPress Themes and Plugins
 
WCBos13 intermediate workshop
WCBos13 intermediate workshopWCBos13 intermediate workshop
WCBos13 intermediate workshop
 
Introduction to Custom WordPress Themeing
Introduction to Custom WordPress ThemeingIntroduction to Custom WordPress Themeing
Introduction to Custom WordPress Themeing
 
Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016
 
Newbies guide to customizing word press themes 25
Newbies guide to customizing word press themes 25Newbies guide to customizing word press themes 25
Newbies guide to customizing word press themes 25
 
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
 
How to get your theme in WordPress
How to get your theme in WordPressHow to get your theme in WordPress
How to get your theme in WordPress
 
Anatomy of a Wordpress theme
Anatomy of a Wordpress themeAnatomy of a Wordpress theme
Anatomy of a Wordpress theme
 
Keeping Your Themes and Plugins Organized.
Keeping Your Themes and Plugins Organized.Keeping Your Themes and Plugins Organized.
Keeping Your Themes and Plugins Organized.
 
Writing a WordPress Theme - HighEdWeb 2013 #WRK2
Writing a WordPress Theme - HighEdWeb 2013 #WRK2Writing a WordPress Theme - HighEdWeb 2013 #WRK2
Writing a WordPress Theme - HighEdWeb 2013 #WRK2
 
American University WordPress Theming Lecture
American University WordPress Theming LectureAmerican University WordPress Theming Lecture
American University WordPress Theming Lecture
 
Intro To WordPress Themes
Intro To WordPress ThemesIntro To WordPress Themes
Intro To WordPress Themes
 
MCC Web Design Workshop
MCC Web Design WorkshopMCC Web Design Workshop
MCC Web Design Workshop
 
Submitting to the WordPress Theme Directory
Submitting to the WordPress Theme DirectorySubmitting to the WordPress Theme Directory
Submitting to the WordPress Theme Directory
 
Websites With Wordpress
Websites With WordpressWebsites With Wordpress
Websites With Wordpress
 
WordPress Template hierarchy
WordPress Template hierarchyWordPress Template hierarchy
WordPress Template hierarchy
 
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slides
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slidesKeep Your Code Organized! WordCamp Montreal 2013 Presentation slides
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slides
 

More from Naeem Junejo

Introduction databases and MYSQL
Introduction databases and MYSQLIntroduction databases and MYSQL
Introduction databases and MYSQLNaeem Junejo
 
WordPress theme setting page
WordPress theme setting pageWordPress theme setting page
WordPress theme setting pageNaeem Junejo
 
Introduction To WordPress
Introduction To WordPressIntroduction To WordPress
Introduction To WordPressNaeem Junejo
 
Wordpress custom-posttype
Wordpress custom-posttypeWordpress custom-posttype
Wordpress custom-posttypeNaeem Junejo
 

More from Naeem Junejo (6)

Freelancing
FreelancingFreelancing
Freelancing
 
Introduction databases and MYSQL
Introduction databases and MYSQLIntroduction databases and MYSQL
Introduction databases and MYSQL
 
WordPress theme setting page
WordPress theme setting pageWordPress theme setting page
WordPress theme setting page
 
Introduction To WordPress
Introduction To WordPressIntroduction To WordPress
Introduction To WordPress
 
jQuery Mobile
jQuery MobilejQuery Mobile
jQuery Mobile
 
Wordpress custom-posttype
Wordpress custom-posttypeWordpress custom-posttype
Wordpress custom-posttype
 

Recently uploaded

UNIT I Design Thinking and Explore.pptx
UNIT I  Design Thinking and Explore.pptxUNIT I  Design Thinking and Explore.pptx
UNIT I Design Thinking and Explore.pptxGOWSIKRAJA PALANISAMY
 
Quantitative research methodology and survey design
Quantitative research methodology and survey designQuantitative research methodology and survey design
Quantitative research methodology and survey designBalelaBoru
 
25 CHUYÊN ĐỀ ÔN THI TỐT NGHIỆP THPT 2023 – BÀI TẬP PHÁT TRIỂN TỪ ĐỀ MINH HỌA...
25 CHUYÊN ĐỀ ÔN THI TỐT NGHIỆP THPT 2023 – BÀI TẬP PHÁT TRIỂN TỪ ĐỀ MINH HỌA...25 CHUYÊN ĐỀ ÔN THI TỐT NGHIỆP THPT 2023 – BÀI TẬP PHÁT TRIỂN TỪ ĐỀ MINH HỌA...
25 CHUYÊN ĐỀ ÔN THI TỐT NGHIỆP THPT 2023 – BÀI TẬP PHÁT TRIỂN TỪ ĐỀ MINH HỌA...Nguyen Thanh Tu Collection
 
30-de-thi-vao-lop-10-mon-tieng-anh-co-dap-an.doc
30-de-thi-vao-lop-10-mon-tieng-anh-co-dap-an.doc30-de-thi-vao-lop-10-mon-tieng-anh-co-dap-an.doc
30-de-thi-vao-lop-10-mon-tieng-anh-co-dap-an.docdieu18
 
EDD8524 The Future of Educational Leader
EDD8524 The Future of Educational LeaderEDD8524 The Future of Educational Leader
EDD8524 The Future of Educational LeaderDr. Bruce A. Johnson
 
3.14.24 Gender Discrimination and Gender Inequity.pptx
3.14.24 Gender Discrimination and Gender Inequity.pptx3.14.24 Gender Discrimination and Gender Inequity.pptx
3.14.24 Gender Discrimination and Gender Inequity.pptxmary850239
 
THYROID HORMONE.pptx by Subham Panja,Asst. Professor, Department of B.Sc MLT,...
THYROID HORMONE.pptx by Subham Panja,Asst. Professor, Department of B.Sc MLT,...THYROID HORMONE.pptx by Subham Panja,Asst. Professor, Department of B.Sc MLT,...
THYROID HORMONE.pptx by Subham Panja,Asst. Professor, Department of B.Sc MLT,...Subham Panja
 
Plant Tissue culture., Plasticity, Totipotency, pptx
Plant Tissue culture., Plasticity, Totipotency, pptxPlant Tissue culture., Plasticity, Totipotency, pptx
Plant Tissue culture., Plasticity, Totipotency, pptxHimansu10
 
3.12.24 The Social Construction of Gender.pptx
3.12.24 The Social Construction of Gender.pptx3.12.24 The Social Construction of Gender.pptx
3.12.24 The Social Construction of Gender.pptxmary850239
 
3.14.24 The Selma March and the Voting Rights Act.pptx
3.14.24 The Selma March and the Voting Rights Act.pptx3.14.24 The Selma March and the Voting Rights Act.pptx
3.14.24 The Selma March and the Voting Rights Act.pptxmary850239
 
DLL Catch Up Friday March 22.docx CATCH UP FRIDAYS
DLL Catch Up Friday March 22.docx CATCH UP FRIDAYSDLL Catch Up Friday March 22.docx CATCH UP FRIDAYS
DLL Catch Up Friday March 22.docx CATCH UP FRIDAYSTeacherNicaPrintable
 
Auchitya Theory by Kshemendra Indian Poetics
Auchitya Theory by Kshemendra Indian PoeticsAuchitya Theory by Kshemendra Indian Poetics
Auchitya Theory by Kshemendra Indian PoeticsDhatriParmar
 
2024 March 11, Telehealth Billing- Current Telehealth CPT Codes & Telehealth ...
2024 March 11, Telehealth Billing- Current Telehealth CPT Codes & Telehealth ...2024 March 11, Telehealth Billing- Current Telehealth CPT Codes & Telehealth ...
2024 March 11, Telehealth Billing- Current Telehealth CPT Codes & Telehealth ...Marlene Maheu
 
Metabolism , Metabolic Fate& disorders of cholesterol.pptx
Metabolism , Metabolic Fate& disorders of cholesterol.pptxMetabolism , Metabolic Fate& disorders of cholesterol.pptx
Metabolism , Metabolic Fate& disorders of cholesterol.pptxDr. Santhosh Kumar. N
 
ICS2208 Lecture4 Intelligent Interface Agents.pdf
ICS2208 Lecture4 Intelligent Interface Agents.pdfICS2208 Lecture4 Intelligent Interface Agents.pdf
ICS2208 Lecture4 Intelligent Interface Agents.pdfVanessa Camilleri
 
AUDIENCE THEORY - PARTICIPATORY - JENKINS.pptx
AUDIENCE THEORY - PARTICIPATORY - JENKINS.pptxAUDIENCE THEORY - PARTICIPATORY - JENKINS.pptx
AUDIENCE THEORY - PARTICIPATORY - JENKINS.pptxiammrhaywood
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE...Nguyen Thanh Tu Collection
 
LEAD6001 - Introduction to Advanced Stud
LEAD6001 - Introduction to Advanced StudLEAD6001 - Introduction to Advanced Stud
LEAD6001 - Introduction to Advanced StudDr. Bruce A. Johnson
 

Recently uploaded (20)

UNIT I Design Thinking and Explore.pptx
UNIT I  Design Thinking and Explore.pptxUNIT I  Design Thinking and Explore.pptx
UNIT I Design Thinking and Explore.pptx
 
Quantitative research methodology and survey design
Quantitative research methodology and survey designQuantitative research methodology and survey design
Quantitative research methodology and survey design
 
25 CHUYÊN ĐỀ ÔN THI TỐT NGHIỆP THPT 2023 – BÀI TẬP PHÁT TRIỂN TỪ ĐỀ MINH HỌA...
25 CHUYÊN ĐỀ ÔN THI TỐT NGHIỆP THPT 2023 – BÀI TẬP PHÁT TRIỂN TỪ ĐỀ MINH HỌA...25 CHUYÊN ĐỀ ÔN THI TỐT NGHIỆP THPT 2023 – BÀI TẬP PHÁT TRIỂN TỪ ĐỀ MINH HỌA...
25 CHUYÊN ĐỀ ÔN THI TỐT NGHIỆP THPT 2023 – BÀI TẬP PHÁT TRIỂN TỪ ĐỀ MINH HỌA...
 
30-de-thi-vao-lop-10-mon-tieng-anh-co-dap-an.doc
30-de-thi-vao-lop-10-mon-tieng-anh-co-dap-an.doc30-de-thi-vao-lop-10-mon-tieng-anh-co-dap-an.doc
30-de-thi-vao-lop-10-mon-tieng-anh-co-dap-an.doc
 
EDD8524 The Future of Educational Leader
EDD8524 The Future of Educational LeaderEDD8524 The Future of Educational Leader
EDD8524 The Future of Educational Leader
 
t-test Parametric test Biostatics and Research Methodology
t-test Parametric test Biostatics and Research Methodologyt-test Parametric test Biostatics and Research Methodology
t-test Parametric test Biostatics and Research Methodology
 
3.14.24 Gender Discrimination and Gender Inequity.pptx
3.14.24 Gender Discrimination and Gender Inequity.pptx3.14.24 Gender Discrimination and Gender Inequity.pptx
3.14.24 Gender Discrimination and Gender Inequity.pptx
 
THYROID HORMONE.pptx by Subham Panja,Asst. Professor, Department of B.Sc MLT,...
THYROID HORMONE.pptx by Subham Panja,Asst. Professor, Department of B.Sc MLT,...THYROID HORMONE.pptx by Subham Panja,Asst. Professor, Department of B.Sc MLT,...
THYROID HORMONE.pptx by Subham Panja,Asst. Professor, Department of B.Sc MLT,...
 
Least Significance Difference:Biostatics and Research Methodology
Least Significance Difference:Biostatics and Research MethodologyLeast Significance Difference:Biostatics and Research Methodology
Least Significance Difference:Biostatics and Research Methodology
 
Plant Tissue culture., Plasticity, Totipotency, pptx
Plant Tissue culture., Plasticity, Totipotency, pptxPlant Tissue culture., Plasticity, Totipotency, pptx
Plant Tissue culture., Plasticity, Totipotency, pptx
 
3.12.24 The Social Construction of Gender.pptx
3.12.24 The Social Construction of Gender.pptx3.12.24 The Social Construction of Gender.pptx
3.12.24 The Social Construction of Gender.pptx
 
3.14.24 The Selma March and the Voting Rights Act.pptx
3.14.24 The Selma March and the Voting Rights Act.pptx3.14.24 The Selma March and the Voting Rights Act.pptx
3.14.24 The Selma March and the Voting Rights Act.pptx
 
DLL Catch Up Friday March 22.docx CATCH UP FRIDAYS
DLL Catch Up Friday March 22.docx CATCH UP FRIDAYSDLL Catch Up Friday March 22.docx CATCH UP FRIDAYS
DLL Catch Up Friday March 22.docx CATCH UP FRIDAYS
 
Auchitya Theory by Kshemendra Indian Poetics
Auchitya Theory by Kshemendra Indian PoeticsAuchitya Theory by Kshemendra Indian Poetics
Auchitya Theory by Kshemendra Indian Poetics
 
2024 March 11, Telehealth Billing- Current Telehealth CPT Codes & Telehealth ...
2024 March 11, Telehealth Billing- Current Telehealth CPT Codes & Telehealth ...2024 March 11, Telehealth Billing- Current Telehealth CPT Codes & Telehealth ...
2024 March 11, Telehealth Billing- Current Telehealth CPT Codes & Telehealth ...
 
Metabolism , Metabolic Fate& disorders of cholesterol.pptx
Metabolism , Metabolic Fate& disorders of cholesterol.pptxMetabolism , Metabolic Fate& disorders of cholesterol.pptx
Metabolism , Metabolic Fate& disorders of cholesterol.pptx
 
ICS2208 Lecture4 Intelligent Interface Agents.pdf
ICS2208 Lecture4 Intelligent Interface Agents.pdfICS2208 Lecture4 Intelligent Interface Agents.pdf
ICS2208 Lecture4 Intelligent Interface Agents.pdf
 
AUDIENCE THEORY - PARTICIPATORY - JENKINS.pptx
AUDIENCE THEORY - PARTICIPATORY - JENKINS.pptxAUDIENCE THEORY - PARTICIPATORY - JENKINS.pptx
AUDIENCE THEORY - PARTICIPATORY - JENKINS.pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE...
 
LEAD6001 - Introduction to Advanced Stud
LEAD6001 - Introduction to Advanced StudLEAD6001 - Introduction to Advanced Stud
LEAD6001 - Introduction to Advanced Stud
 

Wordpress theme development

  • 2. WHY WORDPRESS THEMES? • To create a unique look for your WordPress site . • To take advantage of templates, template tags, and the WordPress Loop to generate different website results and looks . • To provide alternative templates for specific site features, such as category pages and search result pages . • To quickly switch between two site layouts, or to take advantage of a Theme or style switcher to allow site owners to change the look of your site .
  • 3. A WORDPRESS THEME HAS MANY BENEFITS, TOO . • It separates the presentation styles and template files from the system files so the site will upgrade without drastic changes to the visual presentation of the site. • It allows for customization of the site functionality unique to that Theme. • It allows for quick changes of the visual design and layout of a WordPress site. • It removes the need for a typical WordPress site owner to have to learn CSS, HTML, and PHP in order to have a great-looking website .
  • 4. WHY SHOULD YOU BUILD YOUR OWN WORDPRESS THEME? THAT'S THE REAL QUESTION. • It's an opportunity to learn more about CSS, HTML, and PHP. • It's an opportunity to put your expertise with CSS, HTML, and PHP to work. • It's creative. • It's fun (most of the time). • If you release it to the public, you can feel good that you shared and gave something back to the WordPress Community
  • 5. THEME DEVELOPMENT STANDARDS • WordPress Themes should be coded using the following standards: • Use well-structured, error-free PHP and valid HTML. ( WordPress Coding Standards ). • Use clean, valid CSS. ( CSS Coding Standards ). • Follow design guidelines in Site Design and Layout .
  • 6. ANATOMY OF A THEME • WordPress Themes live in subdirectories of the WordPress themes directory (wp-content/themes/ by default). • The Theme's subdirectory holds all of the Theme's stylesheet files, template files, and optional functions file (functions.php), JavaScript files, and images. • For example, a Theme named "test" would reside in the directory wp-content/themes/test/. • Avoid using numbers for the theme name, as this prevents it from being displayed in the available themes list. • WordPress includes a default theme in each new installation. Examine the files in the default theme carefully to get a better idea of how to build your own Theme files.
  • 7. THEME STYLESHEET • In addition to CSS style information for your theme, style.css provides details about the Theme in the form of comments. • The stylesheet must provide details about the Theme in the form of comments. • No two Themes are allowed to have the same details listed in their comment headers. • If you make your own Theme by copying an existing one, make sure you change this information first.
  • 9. FUNCTIONS FILE • A theme can optionally use a functions file, which resides in the theme subdirectory and is named functions.php. • This file basically acts like a plugin, and if it is present in the theme you are using, it is automatically loaded during WordPress initialization (both for admin pages and external pages). • Enable Theme Features such as Sidebars, Navigation Menus, Post Thumbnails, Post Formats, Custom Headers, Custom Backgrounds and others. • Set up an options menu, giving site owners options for colors, styles, and other aspects of your theme.
  • 10. WHAT IS A TEMPLATE TAG • A template tag is code that instructs WordPress to "do" or "get" something. • In the case of the header.php template tag for your WordPress site's name, it looks like this: • <h1><?php bloginfo('name'); ?></h1>
  • 11. TEMPLATE TAG -bloginfo • Displays information about your site, mostly gathered from the information you supply in your User Profile and General Settings WordPress Administration Screens. • It can be used anywhere within a template file. • This always prints a result to the browser. • If you need the values for use in PHP, use get_bloginfo(). • Usage – <?php bloginfo( $show ); ?> • Parameters – $show(string) (Optional) Keyword naming the information you want. – Default: name
  • 12. HOW TO PASS TAG PARAMETERS • like PHP functions, many template tags accept arguments, or parameters. • Template tag parameters are variables you can use to change a tag's output or otherwise modify its action in some way. • Tags without parameters • Tags with PHP function-style parameters – Some functions take multiple parameters. – Multiple parameters are separated by commas. – The order of parameters is important! • Tags with query-string-style parameters
  • 13. INCLUDE TAGS • The Template include tags are used within one Template file to execute the HTML and PHP found in another template file. • Include Generic Files – – – – get_header() get_footer() get_sidebar() get_template_part() • Include Other Components – get_search_form() – comments_template()
  • 14. CONDITIONAL TAGS • All of the Conditional Tags test to see whether a certain condition is met, and then returns either TRUE or FALSE. – – – – Is_home() Is_single(); Is_admin(); Is_category();
  • 15. HOW WORDPRESS WORKS • Visitors requests initial WordPress page: index.php • WordPress activates themes • WordPress checks to see which template files are present • Gathers settings stored in database • Retrieves specified number of most recent posts • Stores post data (title, author, content, comments, etc.) in variables • Outputs data into theme page
  • 16. BASIC WORDPRESS THEME PAGE STRUCTURE AND ELEMENTS • • • • • • Header (header.php) Main content (index.php) Sidebar with Widget (sidebar.php) Footer (footer.php) CSS (style.css) The stylesheet called style.css, which controls the presentation (visual design and layout) of the website pages.
  • 17. ANATOMY OF A THEME
  • 18. THE LOOP • The Loop is PHP code used by WordPress to display posts. • Using The Loop, WordPress processes each post to be displayed on the current page, and formats it according to how it matches specified criteria within The Loop tags. • Any HTML or PHP code in the Loop will be processed on each post.
  • 20. ADDITIONAL WORDPRESS TEMPLATE FILES • • • • • Archive (archive.php) Custom Page (page.php) Single Post (single.php) Comments (comments.php) Search Results (search.php)
  • 21. THE ARCHIVE TEMPATE FILE • • • • • • • • archive.php Fall back for 6 different page types: Author Tag Category Taxonomy Date Archives
  • 22. THE CUSTOM PAGE TEMPATE FILE • page.php • Used to create all custom pages • Additional custom page template can be created