yalcinA
Support threads created in the last 30 days: 0
Favorite Forum Topics
This user has no favorite topics.
Forum Topics Created
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
No "featured image" in the content template but it still shows in views
Started by: yalcinA in: Toolset Professional Support |
2 | 2 | 5 years ago | ||
format the “event calendar” date outputted by views
Started by: yalcinA
in: Toolset Professional Support
Problem: The issue here was that the user was using the event calendar plugin to display their date fields, however when retrieving the date values with the [wpv-post-field name="_EventStartDate"] shortcode that our views plugin provides they are getting a timestamp value. Solution: To resolve this you will need to use some custom code to convert the timestamp to a human readable format. Add the following to your toolset custom code section in Toolset->Settings-> Custom code and activate it. // Add Shortcode function format_date( $atts ) { // Attributes $atts = shortcode_atts( array( 'date' => '', ), $atts ); $date = $atts['date']; return date("l M, d, Y", strtotime($date)); } add_shortcode( 'format_date', 'format_date' ); This shortcode will convert the timestamp into a human readable date. An example usage is [format_date date="[wpv-post-field name='_EventStartDate']"] |
2 | 14 | 5 years, 2 months ago |