Viewing 11 replies - 1 through 11 (of 11 total)
  • Hi adiazudin. Just curious if there is some particular reason you want it to be in the menu? Does your menu currently extend all the way across the top of the secondary sidebar?

    Thread Starter Adi Azudin

    (@adiazudin)

    Hi Bdbrown. This is not so important part, just to show todays date on header if possible.

    I think you’ll need to modify header.php using a child theme. Here are a couple of options:
    1. This thread discusses adding some code into the header file.
    2. An alternative would be to paste the code into a widget in a custom theme sidebar, and add a dynamic sidebar to the header file.
    3. A third option would be use javascript as discussed in this tutorial.

    Let me know if you have any questions.

    Thread Starter Adi Azudin

    (@adiazudin)

    Hi bdbrown, I’m using child theme. The result you can see in my site. I not really sure where to put the coding on header.php. It’s funny looking at it now.

    Thread Starter Adi Azudin

    (@adiazudin)

    I want it to appear above the green bar.

    Try adding this to your css:

    .xdate {
      float: right;
    }

    Since it’s within the nav container it should stay visible until the viewport reaches 720px width at which point the nav collapses.

    Thread Starter Adi Azudin

    (@adiazudin)

    I adding this:

    .xdate {
    float: right;
    font-size: 18px;
    font-weight: 600;
    margin-right: 5px;
    margin-top: -35px;
    }

    Looks good. If you don’t need any further assistance here then please mark the topic as resolved. Thanks.

    Thread Starter Adi Azudin

    (@adiazudin)

    How to change to my local date & time? It shows wrong there.

    thank you.

    Thread Starter Adi Azudin

    (@adiazudin)

    Everything is perfect now. Thank you bdbrown for help.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘How to show current date/time on header?’ is closed to new replies.