WordPress Get Featured Image Source Path

Prem Tiwari - - WordPress Snippets


Sometime during customizing the WordPress themes or create new templates inside the active theme folder, we need to display the complete path of the featured image from your page or post. This is a very short tutorial, which will let you know how to get the featured image src path.

Use the below code in your theme or template files where you need to print the complete image src path of the featured image.

There are a pre-defined function wp_get_attachment_image_src() to get featured image src path.


Prem Tiwari

Prem Tiwari is the founder of FreeWebMentor.com and also a professional developer and a blogger by hobby.

Tags: , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.