• Resolved withdev

    (@withdev)


    Hello everyone,

    I have installed the plugin and have been trying for several days to put all the info in the top bar.

    I can’t seem to get it right with the CSS.

    Someone can give me a hand, I would be grateful.

    I want the top bar to be aligned and on the top right.

    I would like it to start with the day of the week, month, year, weather symbol, temperature, and lastly the name of the city.

    Thank you for your attention

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter withdev

    (@withdev)

    Sorry the site was inaccessible, it is now operational.
    All help is welcome.

    Thanks

    Plugin Author Uwe Jacobs

    (@uwejacobs)

    I suggest creating a custom template from scratch instead trying to force an existing template via CSS. This way you have full control over the contents, order, and layout. The fields you need for your specific layout are:

    • $owmw_data[timestamp]
    • $owmw_html[now][symbol]
    • $owmw_data[temperature]
    • $owmw_data[temperature_unit_character]
    • $owmw_data[name]

    Let me know in case you need anything else.

    Thread Starter withdev

    (@withdev)

    Thank you for your answer.

    I created the custom template as indicated here.
    I have selected custom 1 and select the options for the weather settings and nothing appear on top bar, only the html code you write above.

    I send you a printout of custom1.php , the settings I chose and the result in the top bar, and with the default layout.

    custom1.php
    layout choose
    settings
    Topbar
    Default layout

    I must be doing something wrong, but I’ve tried everything and can’t get it right. This is what i need/want here.

    Thanks.

    • This reply was modified 1 year, 10 months ago by withdev.
    Plugin Author Uwe Jacobs

    (@uwejacobs)

    The owm-weather/content-owmweather-custom1.php file should look something like that to get close to your desired layout. I added an id for the table and classes for each element so you can fine-tune via CSS.

    <?php
        echo '<table id="owmw-custom-navbar"><tbody><tr>';
        echo '<td class="owmw-custom-date">' . date("F d, Y H:i", $owmw_data[timestamp]) . '</td>';
        echo '<td class="owmw-custom-symbol">' . $owmw_html[now][symbol] . '</td>';
        echo '<td class="owmw-custom-temperature">' . $owmw_data[temperature] . $owmw_data[temperature_unit_character] . '</td>';
        echo '<td class="owmw-custom-location">' . $owmw_data[name] . '</td>';
        echo '</tr></tbody></table>';
    Thread Starter withdev

    (@withdev)

    First of all thank you for your help.
    I’m getting somewhere.

    I applied the code on my content-owmweather-custom1.php

    The weather icon takes up too much space, and the hours are not right.
    Is there something wrong with the php code?

    I move to a new WordPress install and address with the below code applied pls look at wp.haldway.com

    I try applied the css to the box:

    .owmw-custom-navbar {
    display: table-cell;
    vertical-align: middle
    }

    Didn’t work cant do much to setup like i need its possible you can look on my wp, the hours are not ?

    Thank you for yout time

    Plugin Author Uwe Jacobs

    (@uwejacobs)

    I don’t have access to wp.haldway.com.

    Thread Starter withdev

    (@withdev)

    Sorry, forget add rule to cloudflare.
    Can you check now pls ?

    Thanks

    Plugin Author Uwe Jacobs

    (@uwejacobs)

    I was able to get to your site and check things out. I will provide an update to OWM Weather shortly that fixes the date and time value for your special case. Once you have installed the update, replace the contents of custom1.php with this:

    <?php
        echo '<style>.owmw-main-symbol.owmw-symbol-svg { margin-top: -30px; }</style>';
        echo '<table id="owmw-custom-navbar"><tbody><tr>';
        echo '<td class="owmw-custom-date">' . esc_html($owmw_data["today_day"]) . '</td>';
        echo '<td class="owmw-custom-symbol">' .  wp_kses($owmw_html["now"]["symbol"], $owmw_opt['allowed_html']) . '</td>';
        echo '<td class="owmw-custom-temperature">' . esc_html($owmw_data["temperature"] . $owmw_data["temperature_unit_character"]) . '</td>';
        echo '<td class="owmw-custom-location">' . esc_html($owmw_data["name"]) . '</td>';
        echo '</tr></tbody></table>';
    Thread Starter withdev

    (@withdev)

    I have already updated the plugin, and changed the php code.

    The time are already correct, I’ll try to make the rest of the changes with CSS.

    Thank you very much for your help.

    • This reply was modified 1 year, 10 months ago by withdev.
    Plugin Author Uwe Jacobs

    (@uwejacobs)

    Great. Thanks for the update.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Place all the weather info on top bar’ is closed to new replies.