WordPress.org

Ready to get started?Download WordPress

Forums

ZigWeather
[resolved] ZigWeather plugin - How to use custom images? (2 posts)

  1. Mijhagi
    Member
    Posted 9 months ago #

    Hello!

    I am using the ZigWeather plugin to show the current weather on my website.

    I would like to use custom images instead of the default ones.

    For example, these are the ones that show now:
    http://cdn.worldweatheronline.net/images/wsymbols01_png_64/wsymbol_0001_sunny.png

    So obviously, somewhere in the script I need to change this URL to my own custom one.

    Thanks in advace!

    Regards,
    Linus

    http://wordpress.org/extend/plugins/zigweather/

  2. Mijhagi
    Member
    Posted 9 months ago #

    I resolved this issue myself and figured I would post my method.

    In zigweather/widgets.php I disabled this:
    <img src="<?php echo $zigweather->get_iconurl($info)?>" alt="" width="120" />

    And I then replaced it with:
    if(($zigweather->get_description($info)) == Clear) {
    echo "<img src='your-own-custom-image-url' width='120' />";
    } else if(($zigweather->get_description($info)) == Sunny) {
    echo "<img src='your-own-custom-image-url' width='120' />";
    } else..........etc

    Obviously "your-own-custom-image-url" should be the url to the image you want displayed. Good luck with that!

Reply

You must log in to post.

About this Plugin

About this Topic