Does anyone know how I can set an image as featured image for multiple posts.
I have posts in a seri that I would like to use the same image as featured image.
bulk edit doesn’t have featured image in there though.
Does anyone know how I can set an image as featured image for multiple posts.
I have posts in a seri that I would like to use the same image as featured image.
bulk edit doesn’t have featured image in there though.
Comments are closed.
You could hook into the
publish_post
action, check if a featured image has been set, and if not, assign the image you want as the featured image.The publish_post Codex page has a nice example about changing a post after it has been published.
we can use
echo get_the_post_thumbnail($page_ID, 'thumbnail');
in php tag, where is the page/post id the page/post from where we want to display the featured image. Here is a link for it get_the_post_thumbnail
You can do it in your function.php
You can also create a function to do this, with as custom fields of the “main” post.