AI Verified
Get Featured Image Metadata for Current Post
This creates a shortcode that returns the requested metadata item for the current posts' featured image. The item values that can be returned are alt, title, caption, description, or url.
PHP
Voted: 0 by 0 user(s)
// Examples of Use: // [get_featured_image_metadata get="alt" /] --> returns the alt text for the featured image // --- // [get_featured_image_metadata get="title"] // Formatted {metadata} output. // [/get_featured_image_metadata] --> returns "Formatted image_title output."
Scroll down to see more snippets from this codevault.
The author has indicated that this snippet is compatable up to wordpress version: 6.1
Our AI bot has checked this snippet is compatable up to wordpress version: 6.1
Free & Pro
Download this snippet by clicking the download button, then head over to the Code Snippet Plugin settings in your wordpress admin dashboard, select the import menu then upload this file to import into your wordpress site.
Pro Only (Coming Soon)
You will be able to click a button and sync this snippet to your wordpress site automatically and from your dashboard manage all code snippets across all your wordpress sites that have the Code Snippets Pro plugin installed.
Last modified:
04/05/2023
This snippet has the following status:
AI Verified
This snippet has been tested by our AI bot, see any comments below.
AI Bot Comments:
Found 0 vulnerabilities
0
Please see some snippets below related to this snippet..
General
Unverified
Added: 3 months ago
Last Updated: 3 months ago
Use this code to prevent the jumping header. See this guide https://quadlayers.com/fix-jumping-header-in-divi/#:~:text=When%20you%20apply%20changes%20to,creates%20the%20jumping%20header%20illusion....
General
AI Verified
Added: 1 year ago
Last Updated: 1 year ago
Ensures that the filenames of all uploaded files are converted to lowercase, for consistency.
General
AI Verified
Added: 6 months ago
Last Updated: 4 months ago
This PHP code snippet is a custom search filter for WordPress designed to modify the default search behavior in the front end, ensuring that it only provides results for blog posts.
These are some popular snippets from this users codevault..
General
AI Verified
Added: 1 year ago
Last Updated: 1 year ago
This creates a shortcode that returns the requested metadata item for the current posts' featured image. The item values that can be returned are alt, title, caption, description, or url.
Category
Snippet Status