Harshal24
Forum Replies Created
-
Hi Phil,
Thanks, I thought i was doing something wrong.
Can you point me in the right direction with regards to filter the shortcode output using a conditional for that page?HOw do i go about doing that?
OK i am guessing i didnt make myself clear enough.
I have made an event list template & its in my theme folder under plugins\events-manager\templates which display the layout fine even with the shortcode.
However i wanted a different layout for event lists displayed on category specific home page so i made a page template & pasted the above code. When i applied the template to the page it showed me the list of events with the new layout but it showed me all the events.
So i want to find a way in which i can make it course specific.
Is there a way to specify category in $args array?
eg:$args['categoryID'] = 28;
I think that should work.
Yup that was it!!
Thanks a LOT!!
??Thank you Marcus it sort of worked ??
I followed the above method & it didn’t work at first but then, by process of elimination, I figured out the problem, it was infact$args['scope'] = 'future';
if i removed that the search worked.
So my code looks like this now:$args = apply_filters('em_content_events_args', $args); if( get_option('dbem_css_evlist') ) echo '<div class="css-events-list">'; /*$args['scope'] = 'future';*/ $args['limit'] = 3; $args['pagination'] = 1; $args['format'] = '<li> <div class="date-box"> <time itemprop="startDate" datetime="#Y-#m-#d"></time> <span class="month">#M</span> <span class="date">#j</span> <span class="day">#D</span> </div> <div class="img-holder">#_EVENTIMAGE</div> <div class="course-excerpt"> <h1 itemprop="summary">#_EVENTNAME</h1> <span class="short">#_EVENTDATES | #h#a GMT #P hrs | duration | '.$pdu.' PDUs</span><span itemprop="description">#_EVENTEXCERPT</span><a href="#_EVENTPAGEURL" class="more" itemprop="url">More Details</a> <div class="footer" itemprop="offerDetails" itemscope itemtype="https://data-vocabulary.org/Offer"><a href="#" class="enroll">Enroll</a><meta itemprop="currency" content="USD" /><span class="price" itemprop="price">#_EVENTPRICERANGE</span><span><span class="categry">Related course on</span> #_EVENTCATEGORIES</span></div> </div> </li>'; echo '<ul class="event-list" itemscope itemtype="https://data-vocabulary.org/Event">'; echo EM_Events::output( $args ); echo '</ul>'; if( get_option('dbem_css_evlist') ) echo "</div>";
Ofcourse this is with google microdata format which helps in seo. ??
Thanks a lot Marcus ??
Now i am not sure if there needs to be another thread created for this or this is the right place since its still search related, but when i select “This event does not have a physical location”. The search says no events found for any of the categories, search field or even when i am not using templates.
Thanks ??
Well as i mentioned before it works fine when i stop using event-manager templates. Or when i format via the dashboard under events > settings > formatting tabs.
But i am using templates coz i also need to display additional information like trainer name, duration of course & points.
For trainer name I am not using #_CONTACTNAME coz all the events will be entered by a single user & creating multiple users doesn’t make sense.So other than creating custom placeholders for the additional information do you have any idea how to go about doing this using $args?
Hey as i told you i am a bit new to wordpress & php. Sorry to trouble you but is it possible for you to give me an example?
Hi Marcus let me start off by saying its a great plugin, well done you guys.
But unfortunately I am having the exact same problem & i have upgraded it to Version 5.4.4.2. Same issue when i change my theme to Twenty Twelve. I found out that the search stops working when i change the format in wp-content\themes\twentytwelve\plugins\events-manager\templates\events-list.php.
But when i put the same format via the dashboard under events > settings > formatting tabs the search works fine.
In my template file the only change i am making is instead ofecho EM_Events::output( $args );
i am usingecho EM_Events::output(array('scope'=>'future', 'limit'=>3,'format'=>'<li> <div class="date-box"> <span class="month">#M</span> <span class="date">#j</span> <span class="day">#D</span> </div> #_EVENTIMAGE <div class="course-excerpt"> <h1>#_EVENTNAME</h1> <span class="short">#F #j,#Y | #h#a GMT #P hrs</span> #_EVENTEXCERPT<a href="#_EVENTPAGEURL" class="more">More Details</a> <div class="footer"><a href="#" class="enroll">Enroll</a><span class="price">#_EVENTPRICERANGE </span><span>16 PDUs</span></div> </div> </li>'));
Can you tell me what could be the problem? I need it in a template file cause i am planning to bring in values from custom fields.