blog-posting-from-microsoft-word

A1WEBSITEPRO QuestionsCategory: WordPressblog-posting-from-microsoft-word
ABdul asked 3 months ago

Posting blog from microsoft word to wordpress  I want to know how to set featured image directly from MS word  

blog-posting-from-microsoft-word was last modified: April 10th, 2020 by ABdul

Tip: Click on images to make them larger. If you find anything wrong on this page or need further assistance please comment below or contact me. 🙂

Please like, share and subscribe.

Advanced Programming Made Easy

I hope you enjoyed the article. If I was able to help you please consider a tip for the content.

One Time Tip

more tips

Reoccuring Tips

Tips

Cool People Share:
1 Answers
Best Answer
Maximus Mccullough Staff answered 5 months ago

So one way you can handle this issue is by making the very first image the featured image by putting the following code in your functions.php file on your child theme.

function wpsites_auto_set_featured_image() {
 global $post;
 $featured_image_exists = has_post_thumbnail($post->ID);
 if (!$featured_image_exists) {
 $attached_image = get_children( "post_parent=$post->ID&post_type=attachment&post_mime_type=image&numberposts=1" );
 if ($attached_image) {
 foreach ($attached_image as $attachment_id => $attachment) {
 set_post_thumbnail($post->ID, $attachment_id);
 }
 }
 }
 }
add_action('the_post', 'wpsites_auto_set_featured_image');
Answer for blog-posting-from-microsoft-word was last modified: February 21st, 2020 by Maximus Mccullough

Tip: Click on images to make them larger. If you find anything wrong on this page or need further assistance please comment below or contact me. 🙂

Please like, share and subscribe.

Advanced Programming Made Easy

I hope you enjoyed the article. If I was able to help you please consider a tip for the content.

One Time Tip

more tips

Reoccuring Tips

Tips

Cool People Share: