How to directly edit WordPress themes
There are a lot of things that can be changed in WordPress from the administration panel: themes, plugins, content, links, widgets to appear on sidebar, and so on. Wordpress has also the options to edit plugins and themes directly, by editing the template or plugin files. But this feature is probably used very rarely because everything you see there is code, and the code is a problem to many people.
Let’s say you have only a minor issue to change, like the copyright footer text, or the tag for the page title, but you have no clue how to do this. I will explain you how wordpress use template files to render different pages of your website.
When you go to “Appearance”-> “Editor”, a text editor will open with the style.css of the active template you use. In the right of the screen you can see a list with all template files.
The style.css file is the one where the global styles are defined, if you never heard of css it might be a little confusing for you, but if you want only to change the copyright footer text it is fine.
header.php, footer.php and sidebar.php are global file templates, that will show on every page. So if you want to change copyright text select the footer.php from right and then search for the text you want to replace. When you are done press “Update”. Simple, right ?
If you spend some time to look around you will fing that is pretty easy to change things around there, or to delete things that you don’t want to appear anymore.
On your blog you have different type of pages, blog listing page, single blog post page, archive page, normal pages, and others. If a template file is missing, the index.php file will be used to render the website. The most important pages are:
- page.php – this file is used to render pages created trough administration panel
- home.php – this is the blog posts list – it is usually omitted and let index.php to handle blog post list
- single.php – this file will render a single blog post
- archive.php – this file will render archives, categories, tag pages, if their respective files are not present, tag.php, categories.php.
There are many others files that you can use to differentiate wordpress pages, to make you a complete idea you can have a look at a picture from Digging into wordpress .
If you still find it difficult to edit a theme or you need some advanced edits, you should get a freelancer to get your job done. I recommend you to use the largest freelancing website.
Disclosure: Some of the links in this post are "affiliate links." This means if you click on the link and purchase the item, I will receive an affiliate commission
July 6th, 2010 at 8:35 am
I suggest to use Codelobster PHP Edition with special WordPress Themplate Editor.
July 6th, 2010 at 5:11 pm
Looks like nice software, i will give it a try and i will share my opinion on a new article on my blog.
November 22nd, 2010 at 1:31 pm
Thanks a bunch for the chart! It really gave a great visual to the layout and dependencies. Valuable reference!
November 22nd, 2010 at 2:14 pm
The image is the creation of digwp.com , i just wanted to share their great work.
January 6th, 2011 at 8:24 am
Thanks for your tips. Have a nice day
October 8th, 2011 at 7:45 am
Thank you Lucian for that post, be blessed.
December 29th, 2011 at 8:02 am
hi lucia , please tell me , how to edit the premium theme , coz i know there are somewhere hidden codes authors saved, how to clean theme and edit these things please tell me i am waiting for ur responsE?
March 19th, 2012 at 10:36 am
I spent a lot of time editing my themes from the code, I even made them from scratch but I realised that’s not really helpful. Now I am using an online theme generator called Lubith which is really flexible and intuitive. I make most of my design in it and then I make the more subtle changes in the code to get the exact look and feel that I want for my WP theme.
March 19th, 2012 at 10:38 am
Thnaks for sharing with us. Have you ever tried Pagelines ?