• Resolved dkrahl

    (@dkrahl)


    Thanks for coding such a great plugin. I’m using the timeline template style 3 as used here at bottom of the linked page. Would you mind helping me with two queries:

    1: how do I remove the comma after Leisure Valley? Its always getting added to the venue name.

    2: “Find out more>>” Is it possible to customise the target for each event? On our site, most “Find out more” will link as per default to the events details page on the same domain, but I would also like to list external events in the timeline overview and set the “Find out more” link to an external website. I’ve tried to modify the timeline-template php to the following after creating a custom field on the single events page:

    	$customurl = get_post_meta( get_the_ID(), 'eventcustomurl', true);
    	$events_html .= '<a href="' . $customurl . '" class="ect-events-read-more" rel="bookmark">'.esc_html__( 'Find out more', 'the-events-calendar' ).' &raquo;</a>';	$events_html .= '</div>';

    but this does not work.

    Thank you,

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Jyoti Bhandari

    (@jyoti197)

    Hi @dkrahl,

    Thanks for using our plugin.
    1) we are using the default function of the events calendar to display venues. Everything is coming from the events calendar plugin so we can’t remove comma in venues.

    2) In case if you want to change the Find out More link in style 3 then please Go line No. 88 in the templates/timeline-template.php file and you can set href.
    See the below shared example:-
    $events_html .= '<a href="https://eventscalendartemplates.com/timeline-demo/" class="ect-events-read-more" rel="bookmark">'.esc_html__( 'Find out more', 'the-events-calendar' ).' &raquo;</a>';

    Thanks&Regards

    Thread Starter dkrahl

    (@dkrahl)

    Hey Jyoti. Thank you for the quick reply.

    To try, I have managed to tell your template to use the event url field with:
    $events_html .= '<a href="'.esc_url( tribe_get_event_link($event_id) ).'>

    How would I rewrite this to use the value of a custom field “eventcustomurl” that I created for the single events posts? I have tried the following without success:

    $customurl = get_post_meta( get_the_ID(), 'eventcustomurl', true);
    $events_html .= '<a href="'.esc_url( $customurl ).'>

    Cheers,

    • This reply was modified 4 years, 3 months ago by dkrahl.
    • This reply was modified 4 years, 3 months ago by dkrahl.
    Thread Starter dkrahl

    (@dkrahl)

    All figured out: to use custom field content, use:
    get_post_meta( $event_id, 'eventcustomurl', true);

    To remove the comma, search for:
    $venue_details_html.=implode(',', $venue_details );

    Hope this helps someone,

    • This reply was modified 4 years, 3 months ago by dkrahl. Reason: added further solution
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Timeline Template Style 3: more link and remove comma’ is closed to new replies.