Skip to content

This code snippet describes how we can Add Featured Image to any Post by custom code,

Notifications You must be signed in to change notification settings

saeedashraf028/update-wp-post-featured-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

update-wp-post-featured-image

This code snippet describes how we can Add Featured Image to any Post by custom code,

Just call function add_Featured_Image() with Image URL, and post ID.

This will update featured image to post.

You can add this code to your custom plugin file

or just add in functions.php located in wp-content/themes/your-theme.

Example

add_Featured_Image('https://www.gstatic.com/webp/gallery3/1.sm.png', '1');

For any query you can ask me at (email: [email protected])

OR visit my Linked In profile: www.linkedin.com/in/saeedashraf

** Happy-Coding **

About

This code snippet describes how we can Add Featured Image to any Post by custom code,

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages