123ArticleOnline Logo
Welcome to 123ArticleOnline.com!
ALL >> Computer-Programming >> View Article

The Anatomy Of Wordpress Theme

Profile Picture
By Author: Alex Smith
Total Articles: 2
Comment this article
Facebook ShareTwitter ShareGoogle+ ShareTwitter Share

Do you know how a WordPress themes works? Did you think ever all those files in your WordPress theme folder do? This passage on anatomy of WordPress theme gives you the necessary details of it.

Header.php :It is the global file that displays the headers and navigation and containing HTML head code

The loop :The individual template files controls the display of contents of the main area of your website what we call as “the loop”.

The most powerful part of your WordPress theme is the Loop, starting with a query determining which posts or pages to grab and ending with a php “endwhile” statement. Everything in between is left to your choice. You can specify the output of titles, post content, metadata, custom fields and commenting all within the loop etc. Multiple loops and queries can be set on a single page;

A few essential background files are needed for WordPress theme to work. These files can be modified to your needs, and it will powerfully affect the custom look and functionality of your site.

Sidebar.php ...
... : This file controls the sidebar display. Multiple sidebar can be set up in functions.php and the Wordpress wp-admin panel sets the content of the sidebar widgets.

Footer.php: It contains the instructions for global footer and closes HTML tags.

WordPress themes are made up as a folder of template files, each template controls a specific piece of your theme. Parts of your site that remain static no matter what page you are on are controlled by header, sidebar and footer files. You can hack these files so they deduct what page you are on and serve different content accordingly such as displaying different navigation on posts however, it is the most common for these sections to look the same throughout the site.

Index.php : The home page display is cotrolled by this index.php. It contains a loop by default which queries and then displays the most recent blog posts, with a link at the bottom to view the previous posts. You can also specify in wp-admin>settings>read to have the home page be a page you created yourself in WordPress. In that situation, you can specify a different page/URL for the regular blog posts to appear on, and that page is generated by index.php

single.php : All the individual posts display is controlled by a little file called single.php. There is a loop that queries for just one post and displays it.

Page.php :The WordPress pages display are controlled by Page.php. There is provision to eliminate sidebars or other elements or to add other unique elements for the pages alone.

WordPress also supports you to create different page templates for different types of pages. Yu can create a page template by simply copying page.php, then rename it as you like, then add this code to the top.

<?php

/*

Template Name: Your Namehere

*/

?>

Archive.php, category.php, tag.php :If there is no archive file, the archives will look like index.php. You can create an archive.php to override the index.php. Creating a file called category.php will override archives.php for categories only. In the same way, creating a tag.php, will override it for tag archives only.

Comments.php :The output of comments is controlled by this file, which can be included in the loop if you desire comments on your theme. Plugins like Disqus can override this comment.php, which then take over comment functionality.

Functions.php : It allows you to put your own custom php code in order to modify core elements of your theme. To specify multiple sidebars, change the number of characters in the excerpt, or add custom admin panel options from wp-admin this functions.php is used.

Style.css : The main CSS stylesheet for your theme, contaning text at the top which tells WordPress what your theme name is, who the author is, and what the URL of your site is.

The Extras : The Extras like plugins, custom fields, and widgets allow you to customize your site beyond the core functionality of Worpress

Plugins: A major group of open source developers has developed a plethora of plugins which you can freely add on to your theme, includes e-commerce, sideshow and social media wordpress plugins.

Custom fields : Custom fields are special boxes of the main post box in the wp-admin let you create your own options, which will be displayed in the theme. The most Common uses include thumbnail images and javascript includes.

Widgets :Widgets are little modules go in your sidebars. can mix and match preset widgets, and add your own vis plgins or php code. It includes search forms, popular posts lists and advertising blocks also.

Alex Smith is an Author and 10 years of experience in various topics such as like wordpress development, wordpress themes, wordpress plugins, wordpress themes India, wordpress development India etc.

Total Views: 102Word Count: 788See All articles From Author

Add Comment

Computer Programming Articles

1. Which Are The Best Java Coding Classes In Bhopal?
Author: Shankar Singh

2. Warehouse Management In Zambia: Essential Features To Look For
Author: Doris Rose

3. Ecommerce Web Design And Development In Melbourne With The Merchant Buddy
Author: themerchantbuddy

4. Why Website Maintenance Is Crucial For Business Success
Author: Yogendra Shinde

5. Boost Your Business With Smart Invoice Pos Software In Zambia
Author: Cecilia Robert

6. How Stablecoin Development Ensures Stability And Security?
Author: Michael noah

7. Công Cụ Tính Chiều Cao Chuẩn Từ Minbin Tool: Đo Lường Và Cải Thiện Chiều Cao Hiệu Quả
Author: KenJi123

8. How To Make A Courier App For Courier Delivery And Tracking Service
Author: Deorwine Infotech

9. Reputation Management In The Digital Age: Protecting And Enhancing Your Law Firm’s Image
Author: jamewilliams

10. What Features Should I Look For In Wordpress Ecommerce Plugins?
Author: Rocket Press

11. Staying Updated With The Latest Gaming News
Author: Next Tech Plus

12. Game Development: Evolving Technologies And New Horizons
Author: Rick John

13. Why Svelte Is The Most In-demand Framework For Web Development?
Author: Why Svelte Is The Most In-Demand Framework For Web

14. Maximizing Ebay Sales With Maropost/neto And Pursuit Info Solutions
Author: rachelvander

15. The Importance Of Software Testing: Ensuring Quality In Development
Author: John Mathew

Login To Account
Login Email:
Password:
Forgot Password?
New User?
Sign Up Newsletter
Email Address: