Press "Enter" to skip to content

Tag: front-end

Quick Tip: Not sure what template you’re in? Use the WordPress body classes.

Let’s talk about WordPress body classes! But first, an explanation of what this is. This is the first short post, from what I hope will end up being several short posts, called “Quick Tips”. It can take me weeks to write a “normal” sized post on RachieVee, and so, in an effort to keep myself active in 2019, and still pass on tidbits of knowledge, I’ve started this new category. I have also categorized these “Quick Tip” posts based on developer experience. This first post is geared towards “Beginners”. This level is meant for developers just getting to know how WordPress themes work.

What are WordPress body classes?

Back on topic! WordPress body classes are exactly what they sound like. They are HTML classes applied to the body tag of a WordPress site. WordPress themes use the body_class() function to apply these classes auto-magically.

If you’ve ever had an error show up on the front-end of your site, or if you’re looking to change something in a WordPress theme – taking a glance at these classes are a quick way to orient yourself. While these classes won’t tell you exactly what template to look for in a WordPress theme (unless it’s a custom page template), they can provide a clue about where you are in the WordPress template hierarchy.

Not sure what the WordPress template hierarchy is? I’ve linked to it above. It’s a flowchart of how WordPress decides what template file to display on the front-end, based on the type of content. It also differs depending on the theme.

There are only three required files for a WordPress theme: functions.php, style.css and index.php. Any other file aside from these required three, are for additional functionality and/or styling in a theme. The more template files that exist in a WordPress theme, the harder it can be to narrow down bugs or alter anything for those is still getting comfortable in said themes. Here is where the body classes can help.

Leave a Comment

10 Quick WordPress Tips for Front-end Developers

We don’t always realize how much we’re actively learning in our day to day work. We’ve gotten so used to the daily grind of web development, that perhaps finding answers to “gotchas” or successfully troubleshooting a problem, is something we celebrate with a fist bump in the air before we move on to the next thing. What helps me keep this blog going is taking a few seconds to write those discoveries down in a draft. While small, each new bit of knowledge levels me up. I want to share some of those with you today as quick WordPress tips.

The great thing about these 10 quick tips, are that they can be absorbed in this one read. No in-depth tutorials, no lengthy explanations – just small bits of knowledge that hopefully help you grow the same way they’ve enabled me to grow.

Half of these tips are for HTML or CSS, the other half, WordPress functions that I’ve found handy during front-end development. Let’s start from the quickest tips down to ones that require a little more explaining.

Leave a Comment

10 WordPress Things I’ve learned working with 10up

It’s been half a year since I joined the 10up team and I’ve been learning so much about the CMS I love so far. Working with a company where I can continue my WordPress adventures full time has been a rewarding experience. I’ve met new people, dived into open source, and made new discoveries in WordPress. Since it’s long past due for a new post here on RachieVee, I’d love to share 10 WordPress things I’ve learned working with 10up – a mixture of newly discovered tools, techniques and functions!

Spoiler alert, I’ve written more than ten and there are front-end related things too. Confession, I just wanted to use the whole 10 things with 10up title.

13 Comments