WordPress automatically outputs a lot of helpful CSS class names for menus. If you use the wp_nav_menu()
function to display your menus, as all good themes should do, you don’t have to settle for just the default class names.
Category: WordPress Development
Hide WordPress Plugin Deactivation Links
You can prevent WordPress users from being able to deactivate plugins by hiding the ‘Deactivation’ links.
WordPress Must Use Plugins
WordPress must use plugins are plugins that are always loaded and cannot be deactivated within the WordPress admin.
Exclude a Plugin or Theme from WordPress Updates
Anytime you’ve written a custom plugin that isn’t released on WordPress.org or modified a theme, it is best to disable updates for that specific theme or plugin.
Managing WordPress Automatic Updates
WordPress will, by default, automatically update itself when there are security releases. It can also update themes and plugins automatically if necessary. From a security perspective, this is great. However, automatic updates can also present complications.
Disable WordPress Updates for Specific Users
Learn to disable WordPress core, plugin and/or theme updates for specific users. Especially handy when you want to prevent clients from triggering updates willy-nilly.
Require a Featured Image in WordPress
The visual aspects of a site are important and many themes depend on the ‘Featured Image’ functionality in WordPress to provide a better visual experience. So, it only makes sense that you may want to consider requiring a featured image before a post can be published.
Get Attachment ID from a WordPress Image URL
Taking a WordPress image URL and using it to get the attachment ID is a bit tricky. There are a lot of code samples out there that do this, but they all have problems to some degree or another. Pippin Williamson posted a very elegant solution based on comparing the URL to the guid in…… Read More
Add Links to Featured Images in WordPress Programmatically
Featured images are most commonly used to display an image alongside the excerpt for a post on a blog page. If your theme doesn’t link the featured images to the post, can use this code to programmatically add the links.
Remove Image Size Attributes for Responsive Images in WordPress
WordPress, by default, will add the width and height attributes to image elements. These attributes will override CSS width and height properties. Making images with these dimension attributes responsive is a bit of a hassle, or in some cases cannot be done at all. Strip Image Dimension Attributes from Inserted Images Stripping out the image…… Read More