Forums

[resolved] [Plugin: WordPress Popular Posts] Thumbnails not working (2 posts)

  1. jeantil
    Member
    Posted 2 years ago #

    The script TimThumb is used to display thumbnails (cropping, scale pictures...)

    When the picture is called by TimThumb, you have to use the absolute path (example: /wp-content/images/your_picture.jpg)

    BUT, WordPress-popular-posts call the picture with http://www.domain.com, which made TimThumb not showing any picture.

    To resolve that, I replaced

    $img[1]

    by

    parse_url($img[1], PHP_URL_PATH)

    Works fine now!

  2. Héctor Cabrera
    Member
    Posted 2 years ago #

    Hi jeantil,

    Problem is that not everyone installs WordPress in the root of the domain name (eg. http://www.somesite.com/blog), therefore using "/wp-content/images/your_picture.jpg" can be problematic. That is why I decided to use "full" paths instead.

    Anyways, I'll test your hack and include it in the next release if it works on blogs installed on subfolders.

    Thank you for letting me know about this!

Topic Closed

This topic has been closed to new replies.

About this Topic