Viewing 15 replies - 1 through 15 (of 16 total)
  • Thread Starter beru82

    (@beru82)

    I also found this thread here: https://www.ads-software.com/support/topic/plugin-events-manager-new-to-em-a-few-questions

    that covers exactly what I want but I don’t know how to create a plugin? Or is there a possibility to add it to the functions.php?

    how about using conditional placeholders instead? e.g. {has_time}, {no_time}, {all_day} as stated here – https://wp-events-plugin.com/documentation/conditional-placeholders/

    about this thread – https://www.ads-software.com/support/topic/plugin-events-manager-new-to-em-a-few-questions just paste it in your theme functions.php

    Thread Starter beru82

    (@beru82)

    Thanks for your reply,

    I’m playing around with it and managed to get the attribute to show up but it does not override the date that I have to give an event using the date picker.

    How do I set the ‘When’ – box in a single event so it’s not compulsory?

    Thanks

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    There is no easy way to make this happen unfortunately, the date and title is pretty much the only thing that’s compolsory in an event.

    Thread Starter beru82

    (@beru82)

    Hi Marcus and agelonwl,

    I’ve added this code to my functions.php:

    add_filter('em_event_output_placeholder','my_em_approxdate_placeholder',1,3);
    function my_em_approxdate_placeholder($replace, $EM_Event, $result){
    	global $wp_query, $wp_rewrite;
    
    	$findme = 'ApproxDate';
    	$pos = strpos($result, $findme);
    
    	if ($pos === false) { }
    	else {
    		$replace = 'none';
    		if( $EM_Event->attributes[$result] == '' ){
    			$sd = new DateTime($EM_Event->start_date .T. $EM_Event->start_time);
    			$replace = $sd->Format("D, d.m.Y") ." <strong>at</strong> ". $sd->Format("g:i a");
    
    		}
    	}
    	return $replace;
    }

    I’ve added the attribute #_ATT{ApproxDate} to Event Manager Options -> General Options -> Event Attributes and Event Manager Options -> Formatting -> Single Event Page (I’ve replaced #_EVENTDATES – <i>#_EVENTTIMES</i> with #_ATT{ApproxDate})

    The attribute shows up in the back end if I want to add / edit an event but the value (June 2013) is not overwriting the date and time I have to give the event.

    What am I missing?

    Thanks

    Thread Starter beru82

    (@beru82)

    Thread Starter beru82

    (@beru82)

    I’ve also tried

    <strong>Date/Time: </strong>
    {has_approxdate}
    #_ATT{ApproxDate}
    {/has_approxdate}       
    
    {has_no_approxdate}
    #_EVENTDATES - <i>#_EVENTTIMES</i>
    {/has_no_approxdate}

    but to no avail either ??

    At the moment my Single Event Page looks like this:

    <p>
    	<strong>Category: </strong> #_CATEGORIES
    </p>
    #_EVENTNOTES
    
    <br />
    <strong>Date/Time: </strong> #_ATT{approxdate}
    </p>
    {has_location}
    <p>
    	<strong>Location: </strong> #_LOCATIONLINK
    </p>
    {/has_location}
    <p>
    {has_bookings}
    <h3>Bookings</h3>
    #_BOOKINGFORM
    {/has_bookings}

    but it’s not working… The June 2013 is not displayed…

    how about using EM conditional placeholders – https://wp-events-plugin.com/documentation/conditional-placeholders/

    e.g.

    {no_time}TBD{/no_time}
    {has_time}#_EVENTTIMES{/has_time}
    
    {not_long}TBD{/not_long}
    {is_long}#_EVENTDATES{/is_long}
    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    haven’t tested the above, but it looks ok to me, maybe you have issues with the casing (i.e. captials used/not used)

    another alternative is to use categories. assign a TBD category, and using conditional placeholders show specific info for TBD and non-TBD events. Then you can just make the event date the approximate date.

    Thread Starter beru82

    (@beru82)

    Thanks, this works like a charm!

    glad it worked.

    Hey there,

    Would like to do the same/similar for my client: {event dates have month & year, but no date; and event location has city/state, but no specific site yet.)

    I tried the solution above, but possibly I’m not adding the placeholders in the right place? I’ve read through the EM guide on placeholders and even the tutorial. Just not clear where I place the placeholders.

    Any help?

    Great plugin by the way! Does a lot, and allows you to do a lot with it.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    hi @mimi J

    you might want to re-post this is a new thread to avoid confusion then include this thread a reference.

    however have you tried this in your Events > Settings > Formatting > Events > Default single event format ?

    Thanks agelonw…was trying to find a solution to allow both TBC and date specific events for the last few days

    ??

    I will post my way I cot around this in the next post!

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Events in the near future – no fixed date yet’ is closed to new replies.