WordPress.org

Ready to get started?Download WordPress

Forums

TimeZoneCalculator
[resolved] Different Cities for different posts (3 posts)

  1. wombii
    Member
    Posted 1 year ago #

    Hi,
    I m trying to call the time for special cities in several posts by using that code "<?php $timezonecalculator->output($params);?>" inside my sidebar "php-code-widget". It is working fine, but I don't want to show the reader all the 10 cities I selected for the different timezones in australia.
    e.g. for perth I want to show only the timezone-data for perth
    for sydney -> only timezone data for sydney and so on...

    What do I have to change in order to just call a specific timezone and not for all cities I have put in the drag and drop layout section ?

    Is there a way to adjust this code <?php $timezonecalculator->output($params);?> in order to get only the timezone for e.g. sydney
    maybe s.th. like <?php $timezonecalculator->output($params(query ... sydney ...);?> ?
    many thanks
    wombii

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

  2. Bernhard Riedl
    Member
    Plugin Author

    Posted 1 year ago #

    hi wombii,

    sure thing, you need to pass the timezone of choice as parameter. - try to input the following code in the widget:

    global $timezonecalculator;
    
    $timezonecalculator->output(array('timezones' => array('Australia/Perth')));

    there's a list of all available parameters in the other notes section.

    greetz,
    berny

  3. wombii
    Member
    Posted 1 year ago #

    Hi Berny,

    Many thanks !!!
    its working fine.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.