list.php to show excerpt instead of full event post

Home Forums Calendar Products Events Calendar PRO list.php to show excerpt instead of full event post

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #13959
    Mike
    Participant

    Hi guys

    I believe that list.php should show the excerpt (or an except) instead of the full post. I can’t think of any reason why someone would want to show the full event text (including images) in what is usually a summary list view.

    So I grabbed the code from the tooltip display in table.php, and modified the entry display in list.php to look like this:

    echo has_excerpt() ? TribeEvents::truncate($post->post_excerpt) : TribeEvents::truncate(get_the_content(), 30);

    instead of:

    if (has_excerpt ()):
    the_excerpt();
    else:
    the_content();
    endif;

    I think it should be changed for 2.1.

    Thoughts?
    Cheers

    #13991
    Mike
    Participant

    Just remembered (as per a post yesterday) that I also had to modify the same code in single-venue.php.

    There’s a lot of duplicated code between list.php and single-venue.php. Makes it a real pain to get them looking the same.

    #14007
    Rob
    Member

    This is a nice little hack, Mike – thanks for sharing. Let me review it with the team and unless anyone sees a reason not to, we’ll try and work it in for the 2.1 (or subsequent) release.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘list.php to show excerpt instead of full event post’ is closed to new replies.