• Resolved AllotHawl

    (@allothawl)


    hey is there a shortcode to show the previous past date from the current date or previous weekdays from the current date

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Denra.com

    (@denra)

    Hello,

    If you want to show the previous day always you can use:

    [wp-dt-date days=”-1″] will show your precious date in the current WordPress format e.g. m/d/Y for US
    [wp-dt-weekday-name days=”-1″] will show full weekday name e.g. Monday
    [wp-dt-weekday-name-short days=”-1″] will show the short weekday name e.g. Mon

    For earlier days just change days attribute to whatever you need: -2, -5, -10, etc.

    If you need other date format you may use the custom item format:
    [wp-dt-custom format=”” days=”-1″]
    and in the format attribute use the formatting letters from the PHP date() function which you can find here: https://www.php.net/manual/en/function.date.php

    Please see the examples in the description of the plugin too.

    • This reply was modified 5 years, 4 months ago by Denra.com. Reason: Added one more sentence
    Thread Starter AllotHawl

    (@allothawl)

    I appreciate it with the quick response however when putting the shortcode in [wp-dt-weekday-name days=”-1″] it just gives me the current day of the week ?? any other ideas

    Plugin Author Denra.com

    (@denra)

    Hello,

    The problem is that you have copied the code above and it is damaged by the forum system and due to some reason the straight quotes of the attributes are automatically changed to 2 different types. Please change the quotes to straight ones as you type them yourself in the page. The plugin works fine with the correct quotes.

    • This reply was modified 5 years, 4 months ago by Denra.com.
    Plugin Author Denra.com

    (@denra)

    You should use [wp-dt-weekday-name days="-1"] with straight quotes. (I am trying to use the [code] button in reply to solve the issue with the conversion.)

    Plugin Author Denra.com

    (@denra)

    Hello,

    Did we help you to solve your issue?

    I would like to close the thread if your problem was resolved.

    Plugin Author Denra.com

    (@denra)

    Hello,

    I am closing this thread. Please re-open it or create a new one if you need more help.

    Thank you for trying and using our plugin.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘show previous date’ is closed to new replies.