Close

Account

Documentation

Forum

Menu

Weather Forecast

With JNews you can provide weather forecast info for your site visitor. It will allows you to easily add weather forecast element into top header, widget, post, page, and everywhere you want of your site.

Also, we’ve integrate JNews Weather with 4 weather forecast data source. There’re Yahoo Weather, Dark Sky, Open Weather Map and Aeris Weather.

On this part, we will guide you how to use weather forecast feature with JNews that only take a few minutes and your site ready to show weather forecast for today. There’re a few things that we’ll explain to you on this part :

  1. Install JNews Weather Plugin
  2. General Weather Setting
  3. Setup Weather on Top Bar Header
  4. Setup Weather Widget
  5. Setup Weather Shortcode

 

1. Install JNews Weather Plugin


To enable weather forecast on your website, you just need to install JNews – Weather plugin. You can easily to install and activate this plugin from Plugin Dashboard by go to JNews Dashboard → Plugin

 

2. General Weather Setting


Right after you’ve done with the plugin activation, next you can setup general weather settings to fit with your website need. You can access general weather setting by simply go to JNews Dashboard → Customize Style → JNews : General Option → Weather Setting

  1. Weather Forecast Source
    On this option you can choose which weather forecast source that you want to use.
  2. Dark Sky Secret Key
    In case if you’re choose Dark Sky source, this option will occurs. Insert your Dark Sky secret key that you can find on this page here.
  3. Open Weather Map API Key
    In case if you’re choose Open Weather Map source, this option will occurs. Insert your Open Weather Map api key that you can find on this page here.
  4. Aeris Weather Client ID
    In case if you’re choose Aeris Weather source, this option will occurs. Insert your Aeris Weather client id that you can find on this page here.
  5. Aeris Weather Client Secret
    Right after you insert Aeris Weather client id, then you will need to insert Aeris Weather client secret that you can find on this page here.
  6. Default Temperature Unit
    On this option you can choose default temperature for weather forecast which is Celsius or Fahrenheit.
  7. Weather Cache Expired
    On this option you can determine expired time for the weather forecast data cache.
Info

You will need to refersh the page to see the result of your changes.

If you want to purge the current cache, you just need to choose Disable Cache on the Weather Cache Expired option. Then you can setup the Weather Cache Expired option again right after you refresh the page.

 

3. Setup Weather on Top Bar Header


To setup weather on Top Bar Header, you can access the weather setting by simply go to JNews Dashboard → Customize Style → JNews : Header Option → Header – Weather Setting

  1. Top Bar Weather Position
    On this option you can determine the weather element position on top bar header.
  2. Weather Location
    On this option you will need to insert city name only or city name and country code. (ex: london or london, uk)
  3. Weather Auto Detect Location
    Turn on this option if you want to automatically detect weather location of your site visitor.
  4. Top Bar Weather Item
    On this option you can determine behaviour of weather forecast next day info. You also can hide them.
  5. Weather Item Content
    On this option you can determine the content of weather forecast info.

The following attached image below are weather preview on top bar header.

 

4. Setup Weather Widget


To setup weather on Widget, simply go to WordPress Dashboard → Appearance → Widgets

Then you can insert JNews : Weather widget into certain widget area. Inside widget options, you will find the following list options below :

  1. Title
    Insert title text for weather widget.
  2. Weather Location
    Insert city name only or city name and country code. (ex: london or london, uk)
  3. Location Name
    Insert location name for weather widget. Leave blank if you want to use default location that based on weather location field.
  4. Date Format
    Please set date format weather widget, for more detail about this format, please refer toDeveloper Codec. Leave blank if you won’t show them.
  5. Detail Weather Forecast
    On this option you can choose show or hide detail information about weather forecast of current day.
  6. Next Days Weather Forecast
    On this option you can determine behaviour of weather forecast next day info. You also can hide them.
  7. Number of Weather Item
    On this option you can determine the number of weather item that you want to show. This option will not work if you hide next days weather forecast info.
  8. Image Background
    On this option you can insert an image for background of weather widget. If you leave blank this option the default style will use automatically.

The following attached image below are weather preview on widget with and without background.

 

5. Setup Weather Shortcode


You can insert weather element into single post or page using Weather Shortcode. If you’re using Visual Composer, you also can insert weather shortcode by using Text Block element then you can use weather shortcode.

On this part we will guide you how to use weather shortcode. You can follow the instruction below :

  1. First, go to edit certain post on your website that you want to insert weather forecast.
  2. If you’ve been select a post, then put the cursor on the post content section that you want to place weather forecast and click Weather button.
  3. After Weather panel option appear, you will find the following list option below.
    • Weather Location
      Insert city name only or city name and country code. (ex: london or london, uk)
    • Auto Detect Location
      Check this option if you want to automatically detect weather location of your site visitor.
    • Next Days Weather Forecast
      On this option you can determine behaviour of weather forecast next day info. You also can hide them.
    • Number of Weather Item
      On this option you can determine the number of weather item that you want to show. This option will not work if you hide next days weather forecast info.


    Don’t forget to hit Insert button if you’ve done.

The following attached image below are weather shortcode preview.