lundi 30 mars 2015

WordPress Theme Files for Real Beginners

library shelf


You’re just starting out running and building your own website. You are probably using WordPress and getting to the point where you want to modify it. However, you’ve opened a how to guide and it has started out with the line ‘open your themes fuctions.php file’. At which point you’ve face-palmed and realised it’s all much harder than you thought. Eh? What is this mysterious PHP file and how do I modify it?


Don’t worry. Everybody has to start out somewhere and the very fact that you are trying to do it yourself is commendable. Articles for beginners often forget that there are real beginners who need their hand-holding at first. It’s nothing to be ashamed of, people! The only thing you’ll need for this guide is your own website and hosting account.


How to Modify a Website


Modifying a website


Imaged credit: US Navy – public domain


Basically, a website is a bunch of files stored on a computer which a browser accesses and then displays. To modify a website, you need to edit these by opening the file on your computer, updating and changing it and then uploading the file to the original location to overwrite the older version. Simple.


Connecting to a Sever


connector


Image credit: D-Kuru/Wikimedia Commons


Uploading and downloading these files is done using File Transfer Protocol (FTP). The most popular FTP tool is Filezilla. Download and open this and you should see a place to enter a host, username, password, and port numbers. You can find these on the control panel of your host. If you can’t find them, simply ask tech support at your hosting account for help. On the server, there will be a list of files. You might need to refer to your hosts guide to find the right one.


Editing a File


Once you’ve found the file you need to edit, click it to drag it from the right hand pane to the left. This downloads it to your computer. To edit the file, you need use a text editor. So now you’ve made the changes you needed you can reverse the drag and drop process, which will then ask if you want to overwrite the file.


Text Editors


text editors


Image credit: http://ift.tt/1CDJhXC


To edit text, you need to use something like Notepad++, Sublime Text 2 or Emacs. Programs like Word add lots of other file info which is unrelated to the content such as colours, positioning etc. You don’t want this. Instead, Notepad++ has built in FTP support to make it even easier.


WordPress File Locations


map of leeds


Image credit


Many guides you’ll find online will tell you to do things like ‘open the theme’s style sheet’ which is great if you know where it is but can just be baffling if you don’t.


Here’s our handy guide to these common terms and where you can find these files from the root directory.


Themes Directory


This is in wp-content and is named themes. This folder contains all the themes on your website.


Current Theme Directory


This is in the aforementioned theme directory.


Plugins Directory


In wp-content there is a folder called plugins which is where you’ll find all your plugins. Most have their own folder.


Theme Stylesheet


The stylesheet dictates how your website looks. You can find it in the style.css file.


Theme Functions File


This file is in charge of features such as comments, image size and custom posts types. It’s in the functions.php file in the current theme directory.


There you have it. WordPress Theme files for actual beginners. Can you think of any more articles you’d like us to cover for true beginners? Comment below.


Main image credit: http://ift.tt/1CDJkm7






WordPress Theme Files for Real Beginners

Aucun commentaire:

Enregistrer un commentaire