Help Desk

Make Event Titles Link to the Event Website URL

  • Posts: 11 Topics: 3
    | Permalink

    First of all, new user, loving the plug-ins. Downloaded the “Make Event Titles Link to the Event Website URL” extension and have a question. When you click on the link it “stays within” wordpress. I’m looking for it to create a new window with that url. Honestly the reason why is I’m using your plug-in as a work-around in WIX as I can’t find a calendar as great as yours. So I made a WordPress site just for your calendar and then embed that into WIX. Working great until you press a link, then it stays within the calendar and not enough room etc…. would really like to to pop-up into new window.. Sorry to be so wordy… Just want to make it work!!! thanks

    Posts: 6978 Topics: 2
    | Permalink

    Hey artvallarta,

    Thanks for your kind words, super stoked to hear you like our plugin!

    Hmmm… that is not too difficult but takes some time.

    Depending on which calendar you want to do it you will need to create some template overrides.

    You need to look for lines that contain ‘tribe_get_event_link()’, for example in

    wp-content/plugins/the-events-calendar/src/views/list/single-event.php

    <a class="tribe-event-url" href="<?php echo esc_url( tribe_get_event_link() ); ?>" title="<?php the_title_attribute() ?>" rel="bookmark">

    and change that / add ‘target=”_blank”‘ for it to open in a new window, like this:

    <a class="tribe-event-url" href="<?php echo esc_url( tribe_get_event_link() ); ?>" title="<?php the_title_attribute() ?>" rel="bookmark" target="_blank">

    By the way, have you heard about Loxi already? That is one of our newest things. It’s basically an Events Calendar that you can embed wherever you want, for example into a WIX site. Check it out!

    Cheers,
    Andras

    Posts: 11 Topics: 3
    | Permalink

    Thank you for your detailed reply. I’m following you for the most part. I’m looking to modify the monthly view and the mini calendar view. Can you kindly provide the exact locations and the code change. I so appreciate your support.

    Yes, I did look at Loxi…. It was too basic for our needs.

    I look forward to your reply.

    Posts: 6978 Topics: 2
    | Permalink

    For month view you will need to create an override for this file:

    wp-content\plugins\the-events-calendar\src\views\month\single-event.php

    here:

    wp-content/themes/[your-theme]/tribe-events/month/single-event.php

    You need to change this line:

    <h3 class="tribe-events-month-event-title"><a href="<?php echo esc_url( $link ) ?>" class="url"><?php echo $title ?></a></h3>

    to this:

    <h3 class="tribe-events-month-event-title"><a href="<?php echo esc_url( $link ) ?>" class="url" target="_blank"><?php echo $title ?></a></h3>

    This should do the trick.

    I did look at Loxi…. It was too basic for our needs.

    Our Loxi team would be happy to hear about what features you would like to see in Loxi in the future. Could you share some ideas with us? Thanks!

    A.

    Posts: 11 Topics: 3
    | Permalink

    You guys rock! – worked like a charm.. Now I need to do the same for the mini-calendar shown here (for the moment), can you kindly provide me those exact lines like you did for the monthly calendar. Thanks so much…

    As for Loxi, the main issues for me were recurring events. I have over 2200 loaded at the moment and only 75% done loading our calendar. Also needed a mini cal and they don’t offer.. Hope that helps….

    Thanks again for your superstar customer service. I’m in awe!!!

    Alan

    Posts: 11 Topics: 3
    | Permalink

    https://artvallarta.cloudaccess.host/?page_id=524 – sorry forgot the link to the mini cal we are using.. thanks

    Posts: 6978 Topics: 2
    | Permalink

    For the mini cal widget override this file:

    wp-content/plugins/events-calendar-pro/src/views/pro/widgets/modules/single-event.php

    here:

    wp-content/[your-theme]/tribe-events/pro/widgets/modules/single-event.php

    Change line 124 from this:

    <a href="<?php echo esc_url( tribe_get_event_link() ); ?>" rel="bookmark"><?php the_title(); ?></a>

    to this:

    <a href="<?php echo esc_url( tribe_get_event_link() ); ?>" rel="bookmark" target="_blank"><?php the_title(); ?></a>

    Let me know. 😉

    A.

    Posts: 11 Topics: 3
    | Permalink

    Worked like a charm.. I am amazed at your support. Other plugins could learn a lot from your company….

    Sorry to say I have another.

    https://artvallarta.cloudaccess.host/?post_type=tribe_events&tribe_event_display=day&eventDate=2018-09-21

    Also need to make the titles click open in a new window. thanks as always….

    I know how to get rid of the “more information” tab, but not the “continue reading”.. I know that is not your issue, but the wp template. looking at their support now.

    Thanks again for everything.

    Posts: 6978 Topics: 2
    | Permalink

    The continue reading is actually part of the excerpt that shows up.

    If you want to remove that add this to your functions.php file:

    function custom_excerpt_more($more) {
    return;
    }
    add_filter('excerpt_more', 'custom_excerpt_more');
    

    To change link in day view:

    wp-content/plugins/the-events-calendar/src/views/day/single-event.php

    to

    wp-content/[your-theme]/tribe-events/day/single-event.php

    and add the ‘target=”_blank”‘ in line 30.

    Do you have any more places where you want to change this, so we can settle all in one? 😉

    A.

    Posts: 11 Topics: 3
    | Permalink

    My apologies Andres for going on and on. The last reply worked perfectly thanks.

    These are the final requirements.

    Remove “Event Calendar” above the actual calendar – both monthly view and widget mini-calendar
    Remove the “See all” clickable link on the day view calendar. The hover-over information in fine.
    Remove the “location” clickable link on the day view calendar. The location listing is fine, just not the link.

    thanks again….

    Alan

    Posts: 6978 Topics: 2
    | Permalink

    Hi Alan,

    I don’t see “Event Calendar” above your actual calendar, at least not on this page.

    You can hide that with css. You can use the inspector tool of your browser to find out what css class you need to address.

    The same goes with “See All”. For this you’ll need:

    .event-is-recurring a {
    display: none;
    }

    For the location clickable a template override will be needed. This:

    wp-content/plugins/the-events-calendar/src/views/modules/meta/venue.php

    Here:

    [your-theme]/tribe-events/modules/meta/venue.php

    Change

    tribe_get_venue()

    to

    strip_tags( tribe_get_venue() )

    This is about as much as I can do.

    A.

    Posts: 11 Topics: 3
    | Permalink

    Thanks as always Alex.

    I was able to get the “see all” taken care of. thanks

    As for “Event Calendar” – that appears on https://artvallarta.cloudaccess.host/?page_id=524 the mini cal widget

    As for the clickable location. I find the path, but really unsure which line as I can’t find the exact reference you mentioned.

    thanks again

    Alan

    Posts: 6978 Topics: 2
    | Permalink

    Hi,

    For the widget you can just change the widget title under Appearance > Widgets and if I remember correctly you can leave it empty.

    If that doesn’t work, then you can use this css:

    .tribe_mini_calendar_widget .widget-title {
    display: none;
    }

    For the location, it’s on line 26 that looks like this:

    <dd class="tribe-venue"> <?php echo tribe_get_venue() ?> </dd>

    Let me know if that does the trick.

    A.

    Posts: 11 Topics: 3
    | Permalink

    Greetings.. First one worked like a charm

    The venue one did not. This is how line 26 looks now

    <dd class=”tribe-venue”> <?php strip_tags( tribe_get_venue() )cho tribe_get_venue() ?> </dd>

    Look forward to hearing from you

    Alan

    Posts: 6978 Topics: 2
    | Permalink

    Hey,

    that line should look like this

    <dd class="tribe-venue"> <?php echo strip_tags( tribe_get_venue() ) ?> </dd>
    

    I checked and this gave me the expected result.

    A.

    Posts: 11 Topics: 3
    | Permalink

    hmmm…. no luck

    <div class=”tribe-events-meta-group tribe-events-meta-group-venue”>

    <?php esc_html_e( tribe_get_venue_label_singular(), ‘the-events-calendar’ ) ?>

    <dl>
    <?php do_action( ‘tribe_events_single_meta_venue_section_start’ ) ?>

    <dd class=”tribe-venue”> <?php echo strip_tags( tribe_get_venue() ) ?> </dd>
    <?php if ( tribe_address_exists() ) : ?>
    <dd class=”tribe-venue-location”>
    <address class=”tribe-events-address”>
    <?php echo tribe_get_full_address(); ?>

    <?php if ( tribe_show_google_map_link() ) : ?>
    <?php echo tribe_get_map_link_html(); ?>
    <?php endif; ?>
    </address>
    </dd>
    <?php endif; ?>

    Posts: 6978 Topics: 2
    | Permalink

    Sorry to hear that.

    Things are getting a blurry here, so let’s take a step back to make sure we are talking about the same thing.

    Based on my understanding you would like to

    • Remove the clickability / url from the venue name
    • from the day view (e.g. this page)

    Is that right? Thanks for confirming / clarifying.

    A.

    Posts: 11 Topics: 3
    | Permalink

    Yes! Thanks

    Posts: 6978 Topics: 2
    | Permalink

    Okay, that is a bit different then.

    Copy this file:

    wp-content/plugins/the-events-calendar/src/views/day/single-event.php

    here:

    wp-content/themes/twentysixteen-child/tribe-events/day/single-event.php

    Add one line after line 49. It will look like this afterwards:

    $address_delimiter = empty( $venue_address ) ? ' ' : ', ';
    $venue_details['linked_name'] = strip_tags( $venue_details['linked_name'] );

    Hopefully this will fix it.

    Cheers,
    Andras

    Posts: 65
    | Permalink

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

    | Permalink