WordPress.org

Ready to get started?Download WordPress

Forums

Participants Database
[resolved] Can output of Date Field be formatted? (4 posts)

  1. dleifer
    Member
    Posted 6 months ago #

    Excellent Plug-In. Thank you!

    Can the output of a Date Field be formatted? I have a date field populated with full dates: January 10, 2010, but I need to display only the Month and Date: January 10. Is there a way to format this by short code or some other way?

    Or is the solution to create two more fields, "Month" and "Day" and just display those?

    https://wordpress.org/plugins/participants-database/

  2. xnau
    Member
    Plugin Author

    Posted 6 months ago #

    You have two options, you can either change to general time format of your site, or you can use a custom template for your list. Read this: How to Create Custom Templates

    Thas add this to your template, at the top:

    <?php Participants_Db::$date_format = "F j"; ?>

  3. dleifer
    Member
    Posted 6 months ago #

    Thanks for the quick response. I have started reading through the Custom Template options and I think I understand what to do.

    Please consider this case resolved and you can close it.

    Thanks again.

  4. dleifer
    Member
    Posted 6 months ago #

    I implemented your suggestion and code and it did just what I need.

    Thank you again.

Reply

You must log in to post.

About this Plugin

About this Topic