Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
Tagged: 8.36.1, configuration, date format
- This topic has 4 replies, 2 voices, and was last updated 7 years, 6 months ago by
Jamii Corley.
-
AuthorPosts
-
01/28/2019 at 1:53 pm #482857
Jamii Corley
ParticipantWe’re using the Birth date field but need to only show the Month and Day due to privacy concerns. Can you point me at any documentation allowing us to create a custom date format? I’m a PHP developer and I’ve used WordPress filters and actions if that is what’s needed. Thanks!
Jamii01/28/2019 at 3:00 pm #482869Jamii Corley
ParticipantAlso, I need to show only the year for the Membership Date, otherwise I would just change the settings for date to F j instead of F j, Y.
01/28/2019 at 4:35 pm #482917Steven Zahm
Keymaster@ Jamii
Navigate to the Connections Settings admin page and click the Display tab. The date format can be adjusted to omit the year.
Hope this helps!
01/28/2019 at 4:48 pm #482920Steven Zahm
Keymaster@ Jamii
Sorry, I had the page open already so I did not see your follow up up reply.
In this case, I recommend hooking in the to
cn_output_datefilter. It passes four attributes.$html:: This is the html of the date row. Return the HTML as you need with the altered date format. Refer to the../wp-content/plugins/connections/templates/entry/dates/dates-hcard.phpfile for the HTML markup.$date:: This is a cnEntry_Date object. Calling$date->getDate()returns a DateTime object. Calling$date->getType()will return the date type.$entry:: This is the current entry.$atts:: The current shortcode options.
With a filter applied to
cn_output_dateyou’ll be able to check for the date type and alter the format as needed.Hope this helps!
01/28/2019 at 5:40 pm #482925Jamii Corley
ParticipantGreat! Thanks!
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
