How to show full events post in search and tags

Home Forums Calendar Products Events Calendar PRO How to show full events post in search and tags

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #61948
    Norine Leibel
    Participant

    Need a little help writing a function that would have the full info for an event show up in the search and tags, rather than just an excerpt (which turns out to be title and body descrip only.

    I’m using a child theme of twenty twelve. Is there an easy-ish way to do that? Thanks.

    #61956
    Norine Leibel
    Participant

    And now that I think of it, more importantly, is there a way to have the full post show within the category listing view? That way any URL links in the body of the post would be live in the Category view.

    #63498
    Barry
    Member

    So for the search results you could for instance discriminate between events and other posts by editing content.php and (in the default Twenty Twelve theme, around line 33) changing:

    if ( is_search() ) :

    To

    if ( is_search() and ! tribe_is_event() ) :

    And that would display the complete event description rather than the excerpt, but leave other non-event search results untouched. You could go further and pull in other bits of event data using functions like tribe_get_start_date(), too, but I’ll leave that to your imagination.

    And now that I think of it, more importantly, is there a way to have the full post show within the category listing view?

    For this one you would need to override list/single-event.php (please see our Themer’s Guide for details) and locate this line:

    <?php the_excerpt() ?>

    Changing it to:

    <?php the_content() ?>

    Hope that helps!

    #980469
    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 ‘How to show full events post in search and tags’ is closed to new replies.