The #2019AWPChallenge continues in our AWP Facebook group. Contributions are coming in consistently, everything from plugins and themes to more complex headless apps and everything in between.
In this round-up, we’re going to take a look at some great code snippets that have been shared. These code snippets are a great way to quickly and easily perform a function or add functionality to your WordPress site in minutes. Without further ado, let’s jump in!
Trying to get information from your customers about which cURL version they are using can be a frustrating experience. Our very own Matt Cromwell contributed this useful snippet to add cURL information directly into Site Health.
Ever released a plugin update for a user to message and say something along the lines of “Your latest update broke my site! The interface of your plugin is all messed up”. And then you say, “Please clear your browser cache, and everything should work fine.”
To save you the hassle in the first place, Pitor shared a snippet to add a hash to your assets to prevent the browser from caching and serving old assets. Thank him over on the AWP post.
A pain point for many is how confusing and messy the WordPress admin menu system can get. I think we can probably all agree that it can be a bit of a mess.
That’s why Ynot created a handy snippet for splitting the admin menu into three sections.
- Dashboard and Post Type menus
- All other default WordPress menus
- Any other added menu items
Want your menus to be cleaner? Then check out the snippet.
Chris Jenkins needed a solution, how to display the pricing of a specific variable product based on its attributes?
His client didn’t need the range of prices showing like how WooCommerce does it out the box, no. He needed to show that variables price specifically.
He found the solution and shared the gist with the AWP group to use in your own projects; I’m sure this will come in handy for many stores.
We conclude this round-up with another share from Pitor. This time it’s an easy way to migrate from an old password hash algorithm to the WordPress hash password algorithm.
What exactly does it do? It’ll allow you to use an old systems password and login using the old password hashed with the WordPress algorithm without having to reset the password.
Check out the snippet and use it in your next, “I’m coming from an ancient system to WordPress site” build.
Inspired to share?
Don’t be shy! The #2019AWPChallenge is running all year long, and we’d love to see what you’ve been up to, whether it’s a useful code snippet. An interesting use of WordPress, the latest in Gutenberg, and everything in between. Share your post in the AWP Facebook group with the hashtag #2019AWPChallenge.
Write for us!
Are you an AWP member? Would you like to write about the awesome advanced things you’re working on? We’re taking author submissions now and would love to hear from you. Find out more here: https://www.advancedwp.org/contribute/
Jack’s been using WordPress since he was 12 when he built his first website. Since then he’s worked at a range of WordPress companies, you’ll currently find him handling Product & Marketing at MailPoet.