Home › Forums › Calendar Products › Events Calendar PRO › customising [tribe_event_list] shortcode
- This topic has 3 replies, 3 voices, and was last updated 10 years, 8 months ago by
Support Droid.
-
AuthorPosts
-
August 12, 2015 at 3:00 am #995309
Ian
ParticipantI have a customised list-widget.php file to which I have added the line
<?php echo tribe_events_get_the_excerpt() ?>
in order to display extract text.The full segment code is as follows
<div class="<?php tribe_events_event_classes() ?>"> <?php club_tribe_events_list_the_date_headers() ?> <?php tribe_get_template_part( 'pro/widgets/modules/single-event', null, $instance ) ?> <?php echo tribe_events_get_the_excerpt() ?> </div>Below you can see how this looks and how I want it to be changed..

Also – is there a way of making the excerpt return nothing if there is no text in the actual ‘excerpt’ field? At present it takes rather too long a chunk of text from the main text if there is nothing in the field.
August 12, 2015 at 3:12 am #995319Ian
ParticipantI answered much of my own question almost immediately (just had to write it out it seems) by putting the code to call the excerpt into the /modules/single-event.php file!
Now looks like this:

Much better!
One part still to be answered: Can the excerpt call return nothing if there is no ‘actual’ excerpt?
August 12, 2015 at 11:25 am #995505Brian
MemberHi,
Thanks for using our plugins. I can help out.
Are you saying you would like nothing to display if you add no content to the excerpt field correct?
We do not have a function to do that, but this is how I have seen it done for posts:
<?php if( $post->post_excerpt ) { ?>
<?php echo $post->post_excerpt; ?>
<?php } ?>That might work as is in the list widget too.
Let me know if you have any follow up questions.
Thanks
August 27, 2015 at 7:05 am #999539Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘customising [tribe_event_list] shortcode’ is closed to new replies.
