• alucidwake

    (@alucidwake)


    Hi there. I think the plugin is great but it’s missing two super key functionalities.

    1. I have some events that I have images for, and some that I don’t. When I input information in for the events that I don’t have an image for, the plugin still inserts a 15px high blank space in lieu of an image. The same applies for excerpts! Sometimes I only have a Title. Sometimes a Title and an Image. Sometimes a Title and an Excerpt.

    2. Single-date events. Right now it’s a requirement for the plugin to have a start date and end date, but this doesn’t make sense when the event is only for one day. I originally chose this plugin because it would allow me to show multi-date events, but I can’t show single date events! It doesn’t make sense to show something like ‘February 11th 2015 – February 11th 2015’.

    I have to imagine this would be rather straightforward in php to code, but I’m very unfamiliar with the language. Just some query operators and then within the code some if else operators.

    This would propel the plugin to the extreme! If you could either instruct me how to do this or update the plugin to incorporate this, I, and I imagine others, would immensely appreciate it.

    Thanks
    Nick

    https://www.ads-software.com/plugins/upcoming-events-lists/

Viewing 1 replies (of 1 total)
  • For the images (widget-upcoming-events.php):

    <li class="sis_event_entry">
    					<?php
    					if ($event_image != '')
    					{
    					?>
                        <div>
    						<a href="<?php the_permalink(); ?>">
    							<img class="event_image" src="<?php echo $event_image[0]; ?>" alt="">
    						</a>
    					</div>
                        <?php } ?>

    You can use this methodology for the title as well.

    For the date issue:

    <time><?php echo date_i18n( get_option( 'date_format' ), $event_start_date ); if ($event_start_date != $event_end_date) {?> &ndash; <?php echo date_i18n( get_option( 'date_format' ), $event_end_date ); }?></time>

    Unfortunately, if the plugin is updated, it will overwrite this and you’ll have to do it again. Hopefully the developer will go in and address this as not every event has an image associated with it.

Viewing 1 replies (of 1 total)
  • The topic ‘Conditional insertion of Image/Excerpt’ is closed to new replies.