Support » Plugin: Widget Logic » Getting Date with Format

  • Hi guys,

    This I believe should be something simple, however I couldnt get it to work correctly so after a quick search without finding anything I came here.

    I simply want to add the current date to the bottom of my webpage using Widget Logic. I looked up the PHP to do this and used
    This however will not load anything.

    Does anyone have a solution to this? Or know of a better way for me to go about it?

    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • An update,
    It seems the problem I was having was that I used the <?php tags inside the logic.
    Now I can display a time properly, so as a follow up question is there a way to display text, followed by the year?
    For example I am using a text box that has “Created by xxx on “Date””
    Where date is I would like to use Widget logic to display the year (so really I am just using print_r(date(“Y”))).

    Thanks again.

    Plugin Contributor alanft


    You could do this with WL – ideally by using the widget_content filter on an existing widget. But there are PHP widgets out there that you can place in sidebars and widgetised-footers that you can put in the specific code you want – and that would be way easier I think.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Getting Date with Format’ is closed to new replies.