Category Archive: WordPress
Posts about WordPress
Dealing with translation spam
How I respond to “translation spam”, which happens when greasy organizations ask permission to translate your script, extension, plugin, etc.
WordPress Set Featured Image with Fallback
In this tutorial, we’ll see how to enable theme support for Featured Images (aka Post Thumbnails), and also how to display them with fallback image support.
WordPress Do Stuff on First User Login
Here is a code snippet that runs the first time a user logs in to their registered account. Useful for sending custom welcome emails, or whatever.
WordPress Create Upload Files and Directories
This tutorial explains how to create new files and directories in the WordPress /uploads/ folder.
WordPress Allow HTML in Author Bio
By default, WordPress filters out any markup included in the description (bio) of user profiles. Here is a code snippet to allow HTML in author bios.
WordPress Check User Roles
Here is a plug-n-play function to check user roles, based on an array of input values.
WordPress wp-config.php tricks
A concise collection of wp-config.php tricks from my WordPress sites to yours.
Proper usage of get_search_query()
This tutorial explains the two ways to properly use WordPress’ template tag, get_search_query(), depending on context. Note that the information provided in this post also applies to the similar tag, the_search_query().
WordPress Conditional Shortcodes via Ajax
This example builds from the conditional do_shortcode technique to evaluate shortcodes during Ajax requests.
WordPress Conditional Do Shortcode
Quick snippet to call and evaluate WordPress shortcodes conditionally, outside of their normal Post/Page context.
The Right Way to Include Google Fonts in WordPress
This tutorial explains the right (and wrong) way to include (aka enqueue) Google Fonts in your WordPress theme.
Update WordPress Post With Current Time
Here is a simple technique for updating WordPress posts with the current date and time. Useful for timezone/server transfers.