While redesigning DigWP.com, I was experimenting with different layouts for the comments section. In one of those layouts, I needed to prevent widows in the comment text (when it comes to cleanly displayed text, widows are the worst). So after some playing, I came up with a couple of jQuery snippets that work great. Here […]
Here is a good, WP-API method of limiting post display to the currently logged-in post author (i.e., so users can only view their own posts). Here you’ll find two variations of this technique. The first limits the display of posts for non-admin users only. The other limits the display of posts for all users, including […]
This cool little snippet was contributed by VRS from Russia. It enables you to display a set of linked gallery images. You can use this technique anywhere in your theme template file or in any WordPress Post or Page.
Own a Mac? Prevent thieves from wiping your hard drive by setting a firmware password. Especially useful if running any sort of anti-theft or tracking app. Setting a firmware password for macOS is straightforward, requiring only three steps.
Working as a developer at WordPress.org means that I get to log in and help people, update my plugins, and make sure my profile information is current. For quite awhile, however, I was confused about the various URLs that are involved with logging in and managing profiles, preferences, and so forth.. The whole WordPress.org domain […]
When you need to search an array using PHP, you can call upon the ancient powers of in_array() and call it a day. But that only works for flat, or one-dimensional arrays. What if you need to find a value in a multi-dimensional array? Well my friend, there isn’t a native PHP function to help […]
By default, WordPress installs its bundled themes and plugins every time the software is updated. So for example, if you’re running the Hello Dolly plugin and a new version is available, WordPress will update the plugin when you upgrade WordPress.
When your WordPress site is configured to enable pings, the database can fill up with many do_pings WP Cron entries. This post provides a couple of quick ways to clean them up, by either disabling the functionality or deleting the do_pings entries from the database.
Blazing fast snippet for you today: how to select all children except the last child. Targeting HTML with CSS has never been so much fun..
I recently had a conversation with an email guru concerning the ideal headers to use when sending plain-text email messages. Here is the punchline of that insightful exchange..
When WordPress processes shortcodes, it first passes the content through its wpautop() function to convert line breaks to <p></p> or <br /> tags. This order of processing can lead to unwanted paragraph and breaks scattered throughout your shortcode content. This post provides a simple way to prevent this from happening, so you can keep your […]