WordPress theme basics
WordPress theme development in a short version:
Every WordPress theme has its own folder, which you may find in the
wp-content/themes
folder of your WordPress installation.The bare minimum that every WordPress theme needs is an
index.php
andstyle.css
file. Theindex.php
file determines the way the home page looks like, by the so-called WordPress loop. There are also other possibilities for the home page, which we'll see in a minute. Thestyle.css
file contains all the styling or calls for other CSS files. It also contains the name and author of the theme.From
index.php
, lots of different PHP files can be called. Here are a couple of the most common ones, including their meaning:header.php
: This contains the logic for the header of your theme, which mostly contains things such as the logo, website name, search bar, and menu. It also contains the necessary HTML head code.sidebar.php
: This contains the definition of a sidebar, that is used to display widgets. More complex...