10 Quick WordPress Tips for Front-end Developers

Reading Time: 8 mins

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.

Continue reading 10 Quick WordPress Tips for Front-end Developers

Escaping WordPress Template Functions. To do or not to do?

Reading Time: 7 mins

Sanitization, escaping, and validation have become a regular part of my WordPress theme development within the last year. If those words confuse you, don’t worry, I’ve got another draft in my dashboard waiting to be finished. Eventually. 😉

But for those of you that do have a general idea of what these terms mean, perhaps you’ve faced the same nagging questions I had when it came to escaping WordPress template functions. At first, I was just applying escape functions mechanically, while not truly understanding what it was that I was doing, I knew that it was a best practice. Just like WordPress hooks, over time, my understanding became less fuzzy, but until these nagging questions could be answered, I couldn’t feel confident that I was escaping correctly.

Which WordPress template functions should be escaped? Which functions already have this built into core?

By template functions, I mean functions that are regularly used throughout theme development to call content from the dashboard. Like the_title(), the_permalink(), and the_excerpt() to name a few.

This becomes harder to figure out if, like me,  you hadn’t truly dived into WordPress’ mysterious core files for browsing. Or maybe you have, but found it overwhelming to follow the rabbit hole and chain of functions while simultaneously trying to make sense of how WordPress does just one thing. It doesn’t help if your code editor doesn’t make the task any easier. I’m a huge fan of Sublime Text, but have recently been exploring PHP Storm. I won’t lie to you, I still prefer Sublime for my daily development needs, but PHP Storm has a feature that has made learning about WordPress core so much easier.

You can Shift (PC) or Command (Mac) click on any function, WordPress or not, and it will take you to the file and line where that function is written. So for WordPress core, instead of being overwhelmed by all the files in the wp-admin or wp-includes folder, PHP Storm teleports you instantly!

A power ranger teleporting.

And so, via PHP Storm, I narrowed down which core functions actually needed escaping. I threw together a reference until it’s something I commit to memory, and thought it would be useful to share said reference with a blog post. In this post, I’ll also briefly review what escaping does for us, and how we would know if a template function needs escaping. Let’s get to it!

Continue reading Escaping WordPress Template Functions. To do or not to do?

Using ARIA Landmark Roles in WordPress

Reading Time: 6 mins

What’s a girl to write about after so long? Why, things that she loves of course – WordPress and Accessibility. I’ve been getting to know WAI ARIA in recent months, specifically using ARIA landmark roles in WordPress. This seemed like a great place to start as it was a handful of markup to memorize in an otherwise vast amount of ARIA to learn. It’s also familiar to developers if they’ve browsed through WordPress.org themes even if they haven’t realized it yet.

Before we move on, if you’re unfamiliar with what WAI ARIA is ( ARIA for short ), I’ll direct you to W3.org’s reference first.

Reading! So. Much. Reading…

 

Now if you’re like me, and stopped reading by the second line of that massive intimidating wall of jargon, I’d advise reading something easier on the eyes ( and brain ) like the A11y project’s, “Getting Started with ARIA“. I also found this lengthy article recently, “Introduction to WAI ARIA” written by Gez Lemon, and although it’s from 2008, it cleared up a lot for me. I’d recommend giving it a read through.

Now that we have a basic understanding of what ARIA is ( not the pirate Queen of Omega* ), let’s go over what ARIA landmark roles are and how they can make our WordPress themes more accessible.

* A Mass Effect reference that I couldn’t help, but take advantage of.

Continue reading Using ARIA Landmark Roles in WordPress

10 WordPress Things I’ve learned working with 10up

Reading Time: 8 mins

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.

Continue reading 10 WordPress Things I’ve learned working with 10up

How to use the Button Element to improve Accessibility

Reading Time: 8 mins

I’m still here on my ongoing mission of coding accessibly. There is one HTML element that has become a huge stepping stone for me once I learned how to properly use it. That stepping stone was the button element. What? The button element? Why the heck do we need that? Well, if you’ve ever seen code like below, or have written code like this ( points to herself ), then this post is for you:

 

To be honest, I’d been writing code like the above for years until I realized I was missing opportunities. I know other developers that also write code like the above. Why is this the case? Well, there have been some theories of ignorance and fear being the source. In my case, “semantics” was just one of those words that I didn’t come across in the beginning. I just wanted to build things that I could see. It was like trying to build a cabinet with a box full of tools without truly understanding the tools. Sure I can hammer in all the nails and call it a day. Or I can take the time to see what’s in the toolbox. Maybe I’ll find that a screwdriver might be a better tool for some areas of the end product then a hammer. In the end, using the right tools for the job will result in a higher quality product… or cabinet?

PS: Rachel is no good with analogies…

 

And semantics – what does that even mean? Take it from a gal who was thrown head first into web development from a fine arts degree and had to google words like “repository” during her first week. There’s so much lingo out there! Even now, as a more experienced dev, it makes my head spin. So let’s go over it all, shall we? How to use the button element and when it’s the right tool for the job.

Continue reading How to use the Button Element to improve Accessibility