Tag Info

Hot answers tagged

2

You could create a small plugin for this, here is an small example that will try to download and attach a file based on the url in the excerpt field for the post: add_action('publish_post', 'auto_featured_image_publish_post'); function auto_featured_image_publish_post($post, $post_id) { // check if this post is saved for the first time ...


1

You can make use of properties on elements. Have a look at the following concept and see if you can use it. You basically hide all "featured" images. Add a general class to the post titles which you want to use to show/hide images. Add a property to the post title element which holds the id of the image you want to show. Generated MarkUp: <img ...


1

You can use this plugin https://wordpress.org/plugins/quick-featured-images/ In description it says "You can also see posts with no featured image at a glance." But from code side, wordpress manages images, documents any media by creating an attachment post for holding the information about that media and it's relation (if any) with other post/posts, which ...


1

Wordpress codex has the answer, its below. Set the image size by cropping the image and defining a crop position: add_image_size( 'custom-size', 220, 220, array( 'left', 'top' ) ); // Hard crop left top When setting a crop position, the first value in the array is the x axis crop position, the second is the y axis crop position. ...


1

No need for the filter. You can just call add_image_size later than the parent & it will overwrite.


1

I figured it out this was a theme option located in the functions.php file set_post_thumbnail_size( 825, 510, true ); This is how this customized size came out in the first place!


1

Here's something I wrote because my clients were using very high quality pngs, when they could be more lossy jpgs for web. Note this still preserves the original image, only changes the thumbnails. Add this to your functions.php <?php //Force PNG Thumbnails into JPGs add_filter('wp_generate_attachment_metadata','force_png_to_jpg'); function ...



Only top voted, non community-wiki answers of a minimum length are eligible