Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Hal Gatewood

    (@halgatewood)

    You can use the do_shortcode function:

    <?php echo do_shortcode('[awesome-weather location="Montreal" units="F" size="tall" override_title="MTL" forecast_days="2" hide_stats=1 background="http://urltoanimage.jpg" custom_bg_color="#cccccc" inline_style="width: 200px; margin: 20px; float: left;"]'); ?>

    Hi, you can add condition to php?
    like: $_SESSION[‘post_city_id’]==’4′

    thanks

    Plugin Author Hal Gatewood

    (@halgatewood)

    Maybe you mean something like this?

    <?php echo do_shortcode('[awesome-weather location="' . $_SESSION['post_city_id'] . '" units="F" size="tall" override_title="MTL" forecast_days="2" hide_stats=1 background="http://urltoanimage.jpg" custom_bg_color="#cccccc" inline_style="width: 200px; margin: 20px; float: left;"]'); ?>

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘PHP code to include plugin Awesome Weather Widget’ is closed to new replies.