How to edit a WordPress Theme Part 2: Finding Code

Want to know where to find code to edit a WordPress theme?

If you are reading this post, chances are you are not a web developer and do not know how to write or read computer code.

That’s ok. I don’t either. Or, I should say that I don’t know how to write code, but I know it when I see it.

But not being coders doesn’t mean we can’t work with code. There are many places to obtain code snippets to copy and paste into your CSS file, as well as in other files, like header.php, footer.php, and page.php for your WordPress theme.

Here are some sources of code:

Theme Developer

If you bought a premium WordPress theme, that theme’s developer will offer support on a forum. You can read the forum to find a situation similar to your own, or post a question on a new topic. If that developer is good, they will reply to your question by offering snippets of code unique to the theme and tell you where to place them.

Finding a developer who offers good, timely support is, I think, the most valuable criteria for choosing a theme.

Chrome

Google Chrome has Developer Tools you can open in Chrome that shows a page’s code as you hover over elements, and it brings up Matched CSS Rules for each line of code highlighted. Making changes gives you a preview, and that matched rule can be copied and pasted into your style sheet.

Here’s a video on using Chrome Developer Tools

The Internet

Code snippets can be found all around the internet. Google your need or try one of these sources.

WordPress.com Forums. Here’s where you can ask questions and get code from people who are really into customizing a WordPress theme.

Stack Overflow also has a forum to search for and request code snippets.

Snippler is a virtual search engine for code.

CSS Tricks offers code solutions for all kinds of situations in a variety of languages.

All About Basic offers tips and tricks. This page is devoted to the Twenty Ten WordPress theme.

Fiverr.com offers a whole segment of WordPress developers who will give you specific code or will performs tasks on your site – all for $5.

W3schools.com offers code and has a Tryit tool where you can test CSS code away from your own site.

Code Warning

As always, be very cautious when editing the code of your WordPress theme. Keep track of what you do and test the site after each customization.

And beware of bad code. To weed out the bad stuff, try using Google Pagespeed Insights.

 

This concludes our two part series on how to edit a WordPress Theme. If you have any questions, please post them in comments. And please Like and Share this page.

Cheers!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.