• Resolved v123shine

    (@v123shine)


    Hello,

    I add this code to my functions.php

    add_theme_support('post-thumbnails');
    add_image_size('img68', 68, 68, true);

    I using below code to display the image:
    <?php the_post_thumbnail('img68'); ?>

    I paste the code, but I cant see anything. The images never appear.

    Note:
    – When I try open the image manually, and i can see the image: https://www.domain.com/wp-upload/images/name-68×68.jpg

    – This above code work well in wordpress 3.4.x

    Please help me.
    Thank You

Viewing 7 replies - 1 through 7 (of 7 total)
  • Have you re-uploaded the image after adding the new image size?

    Thread Starter v123shine

    (@v123shine)

    yes, i already re-upload the image.
    I can see the image: https://www.domain.com/wp-upload/images/name-68×68.jpg

    Thread Starter v123shine

    (@v123shine)

    I have othres site using wordpress 3.4.x –> The code work fine.
    But when i using wordpress 3.5 –> The code not work for me.

    *all my site using the same theme.

    [No bumping. If it’s that urgent, consider hiring someone.]

    There’s not enough info to go on here. It should work and doesn’t make sense that it wouldn’t work on 3.5.

    Try using a different image name, perhaps without numbers.

    Try this code to bring it into your template

    <?php
    if ( has_post_thumbnail() ) : the_post_thumbnail(); the_post_thumbnail('img86'); else : echo 'no thumb';
    ?>

    Make sure it is inside the loop.

    It should return the featured image (full size) and your smaller version. If there isn’t a featured image uploaded to the page it will say “no thumb”.

    What happens?

    Try changing the img68 name to something else.

    Thread Starter v123shine

    (@v123shine)

    Thank you so much “Johnfotios” for your help.

    ## Try using a different image name, perhaps without numbers.
    I change without number, still not working.

    ## Try this code to bring it into your template
    I put your code into index.php file, i got blank page.

    <?php
    if ( has_post_thumbnail() ) : the_post_thumbnail(); the_post_thumbnail('img86'); else : echo 'no thumb';
    ?>

    Please help me.

    Thread Starter v123shine

    (@v123shine)

    OMG, i forget to set the featured image, After i set the image appears well.

    Thank you so much for you help guys.

    -SOLVED-

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Problem with add_image_size ???’ is closed to new replies.