• Resolved arpitap

    (@arpitap)


    Hello!

    I am developing hotel brand website and in that they have different hotels in different locations.
    So what I want to do is when people open one hotel it should display weather for that location and when people open other hotel it will display weather for that location.

    In short I want to display different location weather in each page.

    Can anyone suggest me some way for that? I am PHP guy, so I can make changes in code also if it is required.

    Any help would be appreciated.

    Thanks in advance,
    Arpita

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter arpitap

    (@arpitap)

    I have given some condition in func_accu.php, but it is not taking that conditioning unless I update the backend for wp-forecast.

    Plugin Author tuxlog

    (@tuxlog)

    Well, I can think about two ways of achieving this. first is to create a selection widget with all locations you want and add a bit javascript to set the correct location for your page. the second and easier variant is to add a bit of php to your sidebar.php where you get the pagename and switch to the correct widget.

    e.g.:
    switch($pagename) {
    case ‘page1′: $wid=’A’;break;
    case ‘page2′ : $wid=’B’;break;

    }
    if(function_exists(wp_forecast))
    wp_worecast($wid);
    }

    Thread Starter arpitap

    (@arpitap)

    Thanks tuxlog,

    the problem is that I need to use more than 20 widgets because we have more than 20 hotels in one brand.

    Arpita

    Plugin Author tuxlog

    (@tuxlog)

    you can raise the number of available widget in wp-forecast.php changing $wpf_maxwidgets (somewhere at the top of the file) to the number you need.
    but please keep in mind that this may lead to a sometimes high server load. but you can control this setting the cache time higher and lower the timeout for the connections. it may be that you have to test various settings until you finde the best for your environment. please also have a look at the license from accuweather or weatherbug to make sure you are in line with those.

    regards, hans

    Thread Starter arpitap

    (@arpitap)

    Thanks Hans for your help.

    I will try that and let you know if it helped.

    Arpita

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: wp-forecast] change weather location for each page’ is closed to new replies.