Currently Browsing: WPDev101

get-image-alt-using-wordpress

Get Image ALT Attribute Using Attachment ID

Code that allows you to easily get the alt attribute value for images in WordPress based on the attachment ID. With some fallbacks in case the alt attribute for the image is not supplied.

Continue Reading
enable-gutenberg-on-custom-post-type

Enable Gutenberg on Custom Post Types

Gutenberg is the new content editor in WordPress. But it’s not automatically applied to custom post types, they still use the classic editor. It might be automatically applied in the future but for now a slight code adjustment is needed.

Continue Reading
add-custom-class-body-wordpress

Adding Custom Classes to the Body Tag in WordPress

How to add custom classes or remove existing classes from the body tag in WordPress.

Continue Reading