customising [tribe_event_list] shortcode

Home Forums Calendar Products Events Calendar PRO customising [tribe_event_list] shortcode

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #995309
    Ian
    Participant

    I 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..

    event list

    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.

    • This topic was modified 10 years, 8 months ago by Ian.
    • This topic was modified 10 years, 8 months ago by Ian.
    • This topic was modified 10 years, 8 months ago by Ian.
    • This topic was modified 10 years, 8 months ago by Brian.
    #995319
    Ian
    Participant

    I 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:

    fixed

    Much better!

    One part still to be answered: Can the excerpt call return nothing if there is no ‘actual’ excerpt?

    • This reply was modified 10 years, 8 months ago by Ian.
    • This reply was modified 10 years, 8 months ago by Ian.
    #995505
    Brian
    Member

    Hi,

    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

    #999539
    Support Droid
    Keymaster

    This 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.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘customising [tribe_event_list] shortcode’ is closed to new replies.