Advanced tweaking questions (hide "read more", list by category, custom template

Home Forums Calendar Products Events Calendar PRO Advanced tweaking questions (hide "read more", list by category, custom template

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #962549
    Chris
    Participant

    Hi,

    I am hoping someone can advise if the following is possible and maybe point me in the right direction…
    1. Hiding the “Read More” link if the even does not have anything entered into the standard text area (not the excerpt)
    2. I want to display events by category and then sub-category, according to what categories they have been assigned to – is that possible?
    3. I want to display a list of categories to browse by, is that possible?
    4. I want to create my own 3 column template for events – is this possible?

    Many Thanks

    #962663
    Barry
    Member

    Hi Chris,

    Some great questions there and we’d be happy to point you in the right direction if we can, but we do have a policy of sticking to one issue per support topic.

    With that in mind, let’s focus on the first of your questions and if you can create fresh topics for the others that would be great 🙂

    1. Hiding the “Read More” link if the even does not have anything entered into the standard text area (not the excerpt)

    Am I correct in thinking you are referring to the “Find out more” text that displays in list view, here?

    If so, the first step is to read through our Learn how to customize The Events Calendar which explains the basics for safely overriding and customizing our templates.

    In this case, you are probably most interested in the list/single-event.php template and you would locate the following line:

    <a href="<?php echo esc_url( tribe_get_event_link() ); ?>" class="tribe-events-read-more" rel="bookmark"><?php _e( 'Find out more', 'tribe-events-calendar' ) ?> &raquo;</a>

    Change it to:

    <?php if ( '' != get_the_content() ): ?>
        <a href="<?php echo esc_url( tribe_get_event_link() ); ?>" class="tribe-events-read-more" rel="bookmark"><?php _e( 'Find out more', 'tribe-events-calendar' ) ?> &raquo;</a>
    <?php endif ?>

    Would that work for you here?

    #962837
    Chris
    Participant

    Hi Barry,

    Awesome response and that was exactly what I was looking for. Just to double-check with you, it looks like cusomising the theme files works similar to other WordPress theme customisation methods whereby I create a child theme folder and copy over just the files I am modifying?

    Thanks

    #962892
    Barry
    Member

    Exactly, yes – it’s laid out in more detail within our Themer’s Guide but, for instance, a file like this one:

    plugins/the-events-calendar/views/single-event.php

    Would map to:

    themes/YOUR_THEME/tribe-events/single-event.php

    #963083
    Chris
    Participant

    Thanks

    #963221
    Barry
    Member

    Our pleasure 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Advanced tweaking questions (hide "read more", list by category, custom template’ is closed to new replies.