Thread Starter
Rhand
(@rhand)
I can use a Query Loop Block of course and then I can re-order title, featured image, excerpt and data, but I miss the option to load the event type, organizer or other fields that I would like to load.
-
This reply was modified 4 years, 7 months ago by
Rhand.
Thread Starter
Rhand
(@rhand)
Also tried something like
[events per_page="3" show_filters="false"]
which helps. But this event listing shortcode setup does not allow me to hide images or choose order: date, title, type of event.
P.S. Realized The Events Calendar does not have this option yet either. No blocks to load events on other pages anyways: https://ww.wp.xz.cn/support/topic/gutenberg-blocks-for-other-pages/
-
This reply was modified 4 years, 7 months ago by
Rhand.
-
This reply was modified 4 years, 7 months ago by
Rhand.
Hi @rhand
You can’t hide images or data directly from the shortcode but you can override the template file and then make adjustment.
That much customization is required in special cases and to make it light weight we can’t add more features related to layouts.
thank you
Thread Starter
Rhand
(@rhand)
Thanks for the feedback @hiteshmakvana
When I checked out your documentation on template overrides I saw that I could perhaps copy wp-content/plugins/wp-event-manager/templates/content-summary-event_listing.php and move it to wp-content/themes/my-theme/wp-event-manager/templates/content-summary-event_listing.php.
That file contains:
<div class="wpem-main wpem-single-event-widget">
<a href="<?php the_permalink(); ?>" class="wpem-event-action-url event-widget">
<div class="wpem-event-banner">
<div class="wpem-event-banner-img"><?php display_event_banner(); ?></div>
</div>
<div class="wpem-event-infomation">
<div class="wpem-event-details">
<div class="wpem-event-title">
<h3 class="wpem-heading-text" title="<?php the_title(); ?>"> <?php the_title(); ?></h3>
</div>
<div class="wpem-event-date-time">
<span class="wpem-event-date-time-text"><?php display_event_start_date();?></span>
</div>
<div class="wpem-event-location">
<span class="wpem-event-location-text"><?php if(get_event_location()=='Online Event'): echo __('Online Event','wp-event-manager'); else: display_event_location(false); endif; ?></span>
</div>
<div class="wpem-event-type"><?php display_event_type(); ?></div>
<?php if (get_event_ticket_option()) : ?>
<div class="wpem-event-ticket-type">
<span class="wpem-event-ticket-type-text"><?php echo '#'.get_event_ticket_option(); ?></span>
</div>
<?php endif; ?>
</div>
</div>
</a>
</div>
This file is for the events shortcode I mentioned earlier, correct? Or is it wp-content/plugins/wp-event-manager/templates/content-event_listing.php?
If so I could then also add layout and CSS changes and hide the image.
-
This reply was modified 4 years, 7 months ago by
Rhand.
-
This reply was modified 4 years, 7 months ago by
Rhand.
Hi @rhand
You have to move it to wp-content/themes/my-theme/wp-event-manager/content-summary-event_listing.php
The correct file for listing is content-event_listing.php
It should work fine. Above shortcode is correct.
Thread Starter
Rhand
(@rhand)
Thanks for that @hiteshmakvana . Might have to add a copy of content-event_listing.php to themes/my-theme/wp-event-manager/content-event_listing.php then. This so I can show what the shortcode mentioned does, but better formatted. Will do some testing.