AJD
Forum Replies Created
-
Thank you,
Do you mean that these placeholders already exist or that I need to create them?
I don’t think I am able to create them, and am just suggesting some new ones.
From your site:
If there are any conditional placeholders you feel are missing, feel free to suggest them! We’ll be regularly expanding this list, so if it’s useful to others we’ll probably add it at some point.
Thank you.
That is great!
Thank you.
Aj
Forum: Requests and Feedback
In reply to: ability to search within a specific plugin support forumYeah, I always feel guilty having to post a question which I’m pretty sure has been answered but I can not find.
When google doesn’t give me anything in the first couple pages… I currently setup the keywords I’m after in my browser search box. Then page through the help forum and click ‘search’ on each page. Serious pain.
Thanks to whoever adds this to WordPress, you will save me and many others countless hours of searching.
Forum: Themes and Templates
In reply to: [Highwind] move menuI typo-ed ‘position’ in my code snippet. That would probably be the issue, it needs to be:
position:absolute
Your menu is still:
position:fixed
, but 500px down from the top of the screen.Okay, thanks.
The behavior of defaulting to $0.00 for events that are passed, or full or even events that don’t have booking enabled seems a bit clunky.
However, I am close to finding a solution using nested conditional tags like this:
{has_bookings} <!-- Check that an event has bookings, so we don't show '$0.00 - $0.00' on all events. --> {fully_booked}Fully Booked.{/fully_booked}<!-- In case all tickets are sold. --> {is_future} <!-- Then check to make sure that the event is future, so we don't show '$0.00 - $0.00' as the price for an event that has passed. --> <span class="em_cost">#_EVENTPRICEMIN - #_EVENTPRICEMAX</span> <!-- show the price range on all future events with booking enabled. --> {/is_future} {/has_bookings} {is_past}Event is over.{/is_past}<!-- If the event is over. -->
I also needed to add:
define('EM_CONDITIONAL_RECURSIONS',2);
in wp-config.php
-Cheers
Just to clarify. When a booking has past its deadline or is fully booked the intended output of ‘#_EVENTPRICERANGE’ is ‘$0.00’?
If so, my question is: “How to show the price range of an event and when the bookings are full show: “Bookings Full” or if passed the deadline show: “Booking Deadline Passed” ?
It sounds like the only solution is to make a custom placeholder, however I do not see how lines 1549-1574 of em-event.php relates to that. I don’t see any reference there for the output of #_EVENTPRICERANGE.
Thanks.
Yes it must be a conflict, I’m not sure what yet, but when everything is disabled it gives a proper warning:
Please enter a valid ticket price e.g. 10.50 (no currency signs)
EDIT:
I spoke too soon, it gives the correct notice when editing a regular event. But with the default theme and no plugins, it still gives errors when adding a price with an “$” in it.Hi, yes, some of the events had the free default ticket still showing. Some of them were past the booking deadline. It seems to show $0 if the event is fully booked or past its booking deadline.
Is there a way to change this? It would better to have a message like in the events page where it says: “Bookings are closed for this event.”
Thanks
I tried creating a new event and that didn’t change anything.
I also tried updating the recurring events, because it seems that deleting past instances of a recurring event without deleting the current and future instances is causing the problem.
I selected all 10 recurring events and changed comments to off.
It returned this error:
Notice: Undefined index: event_attributes in /wp-content/plugins/events-manager/classes/em-event.php on line 1901
However, it does seem to have fixed the search problem, because I am no longer getting the previous error.
Update:
When I changed the shortcode to: [event_search_form], now the ajax is working. It inserts the search results into my main page template where I have added:<div class="em-search-wrapper"> <div class="em-search-ajax"> </div> </div>
I am curious if this will interfere in cases when the search form is also included in the page, or if the ajax function just targets the first “.em-search-ajax” class that it finds.
EDIT:
Yes it works! I just had to add the “.em-search-ajax” class to my theme’s ‘post_class’ function. Now the ajax replaces whatever content is in the page with the search results. “.em-search-wrapper” is not necessary.
In functions.php:
function em_search_post_class($classes) { $classes[] = 'em-search-ajax'; return $classes; } add_filter('post_class', 'em_search_post_class');
Yes it looks like the search function targets the .em-search-wrapper and outputs the results into: .em-search-ajax.
I hoped it would be as simple as adding those classes into some divs in my template’s main content area, but that doesn’t work.
However, since [event_search_form] is functional without ajax in the sidebar widget I will leave it at that.
cheers
Where is the JavaScript that runs the search? I could deregister it and register a new version that targets the content area.
My widget is calling the shortcode like this:
echo do_shortcode(‘[event_search_form ajax=1]’);
The ajax is actually working, but it inserts the results into the sidebar, rather than the main window. There must be a simple tweek to the javascript to tell it which div to ajaxify. I’m not sure where that is or how to adjust it.
Thanks, the sidebar widget is works, so I imagine a shortcode plugin would work as well. However, the ajax functionality does not work from the sidebar. It looks like it is attempting to apply the ajax functions to the sidebar content rather than the main content.
If you want an Event Search Widget I made a simple one that calls the [even_search_form]. Add this pastebin to you functions.php, and style it to match your theme.