• Resolved emontzka

    (@emontzka)


    First of all, thanks for this plugin. It’s brilliant! Very handy, although I find it’s pretty much mandatory to address the performance settings in order for the page to load in a timely fashion.

    My question is about displaying dates. I do lots of sites for my musician friends and they often have a gig that starts at 9 or 10 and finishes at 1am-technically the next morning. By default each of these gigs will display both start and end dates, which is unnecessary and confusing. Is there a way I could set this up to show only the start date and not the end date? I’d be willing to hack the code, if necessary. Thanks.

    http://wordpress.org/extend/plugins/events-manager/

Viewing 5 replies - 1 through 5 (of 5 total)
  • have you tried Settings > Pages > Event List/Archives > Are current events past events ?

    Thread Starter emontzka

    (@emontzka)

    That only affects when the event is deleted. I want to only show the start date and never show the end date. I could possibly hide it with javascript but hoping for a more elegant solution.

    you can use placeholder #j #M #Y on Events > Settings > Formatting > Events

    http://wp-events-plugin.com/documentation/placeholders/

    Thread Starter emontzka

    (@emontzka)

    Thanks, but I looked at that and the formatting seems to apply to both start and end dates the same. There’s too much code to hack this plug-in ( and I don’t know much php) so my solution is to just hide any date preceded with a hyphen with jquery. It’s pretty ghetto, but does the trick:

    var dateTd = $('table.events-table tr td:first-child');
    		dateTd.each(function( index ) {
    			 var newText = $(this).text().replace(/-\s\d{2}\/\d{2}\/\d{4}/g,"");
    			 $(this).text(newText);
    			 console.log(newText);
    			})

    another way to display event start date only is to create custom placeholder – http://wp-events-plugin.com/tutorials/create-a-custom-placeholder-for-event-formatting/

    e.g. return

    case '#_EVENTSTARTDATE':
    	$date_format = ( get_option('dbem_date_format') ) ? get_option('dbem_date_format'):get_option('date_format');
    	$replace = date_i18n($date_format, $EM_Event->start);

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Show first day only?’ is closed to new replies.