Posted: December 4, 2017 at 4:02 am
Hello |
|
Hi there, Within your loop you should be able to call |
|
Hi Tony, i really appreciate it. |
|
Sorry, I’m not sure what you are asking for? Have you added the above function into the loop you using currently? There’s an example of a simple event list here: https://gist.github.com/joshfeck/6e33532c37a123bbf532 But it really depends on what you are doing, and where. |
|
Yes i added the above function and it is working fine, but it is not showing the loader while i click on “add Event to cart” button. actually what i am trying to achieve here is the exact same functionality just like Event list Short-code [ESPRESSO_EVENTS] In my custom template with Custom UI. // Custom taxonomy $custom_terms = get_terms($cat_args); foreach($custom_terms as $custom_term) : wp_reset_query(); $args = array( ‘post_type’ => ‘espresso_events’, ); $loop = new WP_Query($args); if($loop->have_posts()) : while($loop->have_posts()) : $loop->the_post(); Title “Add to Cart Button” endwhile; wp_reset_query(); wp_reset_postdata(); |
|
Hi there, That does not look like valid PHP code. What you can do instead is use the |
|
Josh how can i add Category/date and search filter with this and pagination too ? |
|
Pagination will automatically appear if there are more than 10 events. If you want pagination to happen with fewer events, you can add this shortcode parameter:
The above example will make it display pagination after displaying 5 events. Currently there isn’t a search or category date filter feature within the [ESPRESSO_EVENTS] shortcode. |
|
Josh |
|
The support post ‘Add to cart on Event Listing Page’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.