• Resolved jamin84

    (@jamin84)


    I’m having trouble using the crop function with the new 2.9 image editor. I’m using Custom Fields with the image thumb url to show them on the sidebar with the Popular Posts plugin.

    I very much like the predictable image name that WP creates (image-145×110.jpg, image-460×345.jpg) but have now encountered random numbers inserted into the name, like
    image-e1261264757194-145×110.jpg. How can I set it up so the new thumb I create overrides the previous auto-thumb and still follows the predictable format? My media settings thumb width is set to 145×110, cropped to size.

Viewing 1 replies (of 1 total)
  • Thread Starter jamin84

    (@jamin84)

    OK, figured it out.

    1. Create a new template output tag (called mine postthumb) in output_tags.php file, from the Post Plugin Library, which is required for Popular posts plugin I’m using.

    2. My custom function looks like this

    function otf_postthumb ($option_key, $result, $ext) {
    	return get_the_post_thumbnail($result->ID, 'thumbnail' );
    }

    3. Under Popular Posts settings->output, add your new custom tag. Mine looks like this <li><a href="{url}">{postthumb} {title}</a></li>

    You could also make other custom functions for the different sizes if need be. This way, it doesn’t matter what your thumb image is called on the server, and you can skip using custom fields!

Viewing 1 replies (of 1 total)
  • The topic ‘(2.9) Random num assigned to cropped image thumbs’ is closed to new replies.