Below is the list of useful WordPress Snippets that you can use when developing with WordPress.
- Add featured image to REST API
- Get page ID from page title
- Fix Notice Undefined Index
- Get all tags from a post
- Get anything with page / post ID
- Add additional mime types to media library
- Add post images to RSS feed
- Define excerpt length
- Disable self pingbacks
- Embed responsive 16x9 videos
- Exit if direct access is made to file
- Get number of posts in specified term
- Get random post suggestion by categories
- Get random post suggestion by tags
- Remove inline styling from tag cloud