Thursday, January 24, 2013

Starting out with wordpress

When I was first starting to edit a page built on Wordpress, the most helpful information I was given was about where to go to change things. Let me start sharing this by explaining how Wordpress works (at least in part).

Instead of showing the index.html page of the root directory, Wordpress shows the contents of the index.php file of the theme selected.

There are three main folders in a Wordpress installation wp-admin, wp-content, and wp-includes. wp-content is the only folder that contains any customization that you do or want to do, that will be safe from updates. When Wordpress submits an update it is possible that the other two folders may be overwritten completely.

Within the wp-content folder should be several more folders, one of which is a themes folder which contains a folder for every installed theme. Twenty Eleven is sure to be there on a fresh install. Within the folder for the active theme (you can find out which one is active by going to yoursite.com/wp-admin, login, and go to appearance >> themes. By hovering over the "activate" option for any of the themes you may see which folder it would activate) you may find an index.php file. This is not always the case because of Wordpress' priority hierarchy. Wordpress first looks for a home.php and if that is not found,  it will then look for the index.php. These pages usually (and should) include the header.php first, sidebar.php and footer.php last. The header.php should have the link to the style.css. Each of these files should be contained in the theme folder and not within a subfolder.

No comments:

Post a Comment