Do something with thumbnail image on post publish

Actually WordPress offer a good hook , You can get data from Post Published , for more you can follow this example : https://codex.wordpress.org/Plugin_API/Action_Reference/publish_post Example of a simple update of custom field: /* Do something with the data entered */ add_action( ‘save_post’, ‘myplugin_save_postdata’ ); /* When the post is saved, saves our custom data */ … Read more

how to use Data URI for images in WP?

Data URIs don’t cache. So you have the same overhead each page request instead of allowing the user to cache those image requests. For product and banner images it doesn’t make much sense to take extra processing power to convert them on the fly (each request) or pre-process them which means they’ll be stored in … Read more

Slider Thumbnail Size Issue [closed]

You are on a good track. You first define your thumbnail sizes in your functions.php Make you upload big high-quality images but still good enough for the web You then need to regenerate your thumbnail, I recommend this plugin: https://wordpress.org/plugins/regenerate-thumbnails/ In you new code, you need to call your desired thumbnail based on the size … Read more

Adding featured image to post display widget

Your updated code- /** * Custom Post Type Recent Posts widget class * * @since 1.0.0 * @package Custom Post Type Widgets */ class WP_Custom_Post_Type_Widgets_Recent_Posts extends WP_Widget { public function __construct() { $widget_ops = array( ‘classname’ => ‘widget_recent_entries’, ‘description’ => __( ‘Your site’s most recent custom Posts.’, ‘custom-post-type-widgets’ ) ); parent::__construct( ‘custom-post-type-recent-posts’, __( ‘Recent Posts … Read more