Categories
Code

Displaying EXIF Data in WordPress

Over the last 6-months I’ve taken a half-dozen or so courses on LinkedIn Learning, read a couple of books, and spent countless hours taking photos trying to level up my skills as a very amateur photographer.

For me, the technical side of photography is a lot of fun; so when I’m admiring people’s work, I love to look at the technical details behind a photograph. Such as, aperture, ISO, and shutter speed (also known as the exposure triangle) as a beginner, these details are just as interesting as the photo itself.

The standard for saving all kinds of technical details inside a JPG image is called, “Exchangeable Image File Format” — or EXIF for short. I’ll show you how to quickly display some of those details using a WordPress shortcode.

Categories
Code

Modify a Custom Post Type after it’s been registered

Today I was tasked with adding functionality to an existing custom post type. The problem was, the CPT was being registered in a plugin which I could not edit.

After some digging, I found there’s a filter for that (found in post.php) which allows you to modify a custom post type, after it’s been registered some other way.

Categories
Code

Filter and clean the Archive Title

This client wanted to feature their archive titles in a large hero area. The PSD excluded the prefixes like, “Category:”, “Tag:”, “Author:”, etc…

Categories
Code

Get a WordPress Category ID

I rode the struggle bus pretty hard on this one today. I needed to ignore the “featured” category in a loop, and to do so, WP_Query() requires the category ID. Luckily, I found a handy function: get_term_by();

Categories
Code

Remove Emoji Support in WordPress 4.2+

Did anyone actually ask around before making this “feature” mandatory? Let’s get rid of this crap…

Categories
Code

Lock down the WordPress Dashboard

Because of the recent increase in attacks on WordPress, we were recently chatting about locking down /wp-admin and wp-login.php.

We discussed the Limit Login Attempts plugin, which works really well. If a user fails to login after a certain amount of attempts, they are blacklisted for a period of time. But what if we did more?