Tag Info

New answers tagged

0

You should add your custom image size with this code: add_image_size( 'my-test-image-size', 148, 148, true ); Then in your template file you can get cropped image using wp_get_attachment_image_src like this: $attachment_id = ...; // i.e. get_post_thumbnail_id() $image_info = wp_get_attachment_image_src($attachment_id, 'my-test-image-size'); echo ...


1

I'll try and answer this for you based on the limited information you've provided... When using woocommerce, you also need to define the various image sizes for your products in the dashboard at Woocommerce > Settings > Product Image Sizes Whatever size you choose should match the sizes in your Media Library settings, but you've already said that these are ...


1

You should not use the_ID() in this case, since it will echo the ID, use instead get_the_ID() to return it. So please try this instead: $thumb_id = get_post_thumbnail_id( get_the_ID() ); to get the ID of a post thumbnail image. The general rule is that the_*() functions will echo the output, but get_*() functions will return it. But of course there ...


0

I think you can use a different approach: write a custom sql query that get the ids of the thumbnails attachment of the children pages, and if found call wp_get_attachment_image_src on this ids to retrieve the urls: function my_get_thumbnails( $post = NULL, $which = 'both' ) { // first we get the post, if no post is passed we use global post if ( empty( ...


3

I use a plugin called Avatar Manager for that function. The author has also done a tutorial on how to write your own avatar manager plugin, but unfortunately it is also a bit outdated and doesn't work anymore. Although the plugin states it is compatible up to 3.6.1, it is still working in 3.8.1. I know at this stage the plugin is maintained as I just ...


0

It is wery important, that your upload folder and subolders and images has the right permissions for webserver. If not, if you run Thumbnail regenerator plugin, something brakes and the_post_thumbnail failing to run correctly!


0

The *e1367238219134-150x150.jpg files are automatically generated by Wordpress as work copies once you save an image after editing it. In order to use another image on your theme, you would want to contract a coder to modify your the pertinent template files.



Top 50 recent answers are included