The quickest and dirtiest way to do this is to add one line to the insert_posts()
function, just before the $imported++;
line:
}
add_post_meta( $post_id, 'raw_import_data', json_encode( $twitter_raw ) );
// NEW LINE (change 1001 to the image ID):
set_post_thumbnail( $post_id, 1001 );
$imported++;
}
This will obviously disappear if you ever update the plugin. There aren’t any hooks built into the plugin to add your desired functionality, so a more rigorous solution would have to periodically query for posts with, say, the keyring_service
post metadata set, check for any that don’t have the thumbnail set, and then set it to the default.
Related Posts:
- How can I make add_image_size() crop from the top?
- What plugin can I use to create a list / slideshow of featured images?
- Prevent publishing the post before setting a featured image?
- Modify featured image URL at runtime
- Add post thumbnail from external image with plugin
- Thumbnail with different sizes
- Meteor Slides as header only for homepage and Use featured image of each page as header for respective pages
- Set WordPress Featured Image For All Post Slugs Matching Image File Name in Specified Directory
- AJAX image upload with a upload progress bar using media_handle_upload
- Converting Attachment to Images?
- ReOrder Post Within Categories plugin with featured image
- Any Short code Availble for Get Post List With Thumbnail Plugin?
- Set featured image using javascript in post editor
- Add padding while generating thumbnail
- How to export all content with feature images?
- Redirect to another page using contact form 7? [closed]
- Is there a best practice remediation for PhpStorm’s warning that void function the_post_thumbnail is used?
- Plugin to hide image in excerpt
- Cropping images from top center using Jetpack Photon
- Add “Featured Image” box in my plugin post page
- Couple of beginner’s questions [closed]
- Scrape a webpage for image and add it to post
- Regenerate Thumbnails Plugin successfully updated my thumbnails but image src won’t change to new image size?
- Add_image_size not generating correct size
- Multiple Post Thumbnails Plugin – Need help with code
- How to hide featured images of all posts falling under the same category in wordpress?
- Revision featured image
- Allow webp use on website but disallow webp as featured image during post creation
- Upload Image with a file URL and show dynamically on Frontend
- insert og image link in wordpress post
- How to Add call button on a featured image in a wpsite? check the slap king image, there are two buttons on the featured image
- Display Multiple Photos as Featured Image when mouse moves on to it post
- Use AJAX to fetch Current Post Thumbnail for WordPress when Uploaded throughMedia Uploader Frontend
- automatically set random featured image by category in wordpress on post
- Import 2000 posts from one website to another
- Hide Featured Image in AMP
- WordPress create thumbnails on demand
- Automatic set a featured image from the first image’s url (or tag) in the article
- Does WordPress have a way of changing the ‘Natural’ size of uploaded images?
- Update (a function) post’s featured image as soon as $image_url changes
- Can’t get or display post thumbnail in wordpress
- Adding featured image to post display widget
- Do something with thumbnail image on post publish
- How to force regenerate thumbnails in WordPress posts?
- How to add featured image on front end form?
- Lazy Load sometimes don’t work
- Determine if get_the_image has image on Get the image Plugin
- Advanced Custom Field User Help URL
- Retrieve post thumbnails
- featured image problem with custom post type
- Looking for a related post plugin which slides-in like the one at inc.com does [closed]
- when i use wp automatic plugin post shows broken images
- Display Video as Post Thumbnail
- Get URL for featured image for posts? [closed]
- Multiple Post Thumbnails Not Returning URL for Background Image
- Create custom pages with a plugin
- the_post hook is not firing for me
- can we modify wordpress plugin version value to avoid update warning?
- WordPress checkbox and Illegal string offset
- dbDelta not adding additional columns in plugin database update
- Custom license for WordPress plugin
- How to extract data from ‘edit my profile’ page in WordPress?
- Fatal error in form display plugin
- Invalid plugin installation directory, Google Analytics [closed]
- Is it possible for a plugin to force reading and writing of uploaded images to a database instead of to a filesystem?
- Image change on hover
- Need to show featured service boxes on my company website
- $wpdb update query in plugin only updating one column
- Why do plugins often ask to add in to templates?
- Is it fair to use MIT licensed code in WordPress plugins? [closed]
- Plugin retrieving results even after uninstallation
- Editing a text file from plugin menu
- Does using `add_action( ‘init’…` cause performance issues?
- Setting Up PHP Workflow in WordPress
- How to add an element right after the article using jQuery?
- How to reset wordpress but not plugins and settings
- AJAX Load more start with x posts
- php code crashes site – possible syntax error
- White screen after plugins upgrade
- How to add a dvi tag to a shortcode then change a generated text using jQuery
- do_action Nested List
- Deactivate JS Script in Plugin Shortcode
- How to automatically add edit link on frontpage post of any wordpress theme?
- Child Themes and Updating Parent Theme
- How to write “alt” tag in image for wordpress code?
- plugin active error
- How to get a list of bundled products using wp_query in woocommerce
- WordPress reliability
- Allow only Admin role to access plugin settings/options page
- Is it safe to use admin-ajax.php in the frontend?
- Include a php file from another plugin
- Getting a Page via its post-name using WP REST API v2 and Postman
- How to get all posts belongs to a user between a certain date
- Add estimated value for a post according to the number of words
- Passing stored variables to add_filter
- Does heavy theme and plugins affect server’s response time? [closed]
- How can I delete a wordpress widget instance?
- order posts by `meta_key`, Does not display posts that does not have `meta_key`
- Repeated Output in Widget
- How do I make a secure API call from a shortcode when a button is clicked?