link event to url

Home Forums Calendar Products Events Calendar PRO link event to url

Viewing 15 posts - 1 through 15 (of 29 total)
  • Author
    Posts
  • #57975
    Nini
    Participant

    Hi – I am using a 3rd party vendor to sell tix to my event and would like to have the link form the calendar view to go to the url for the tix. I installed a link to url plugin which point the event page to a new url. This solution works for all views (including the event calendar widget) However when you click from the calendar page view – it adds a ‘/’ to the end of the url. Is there any way to change (fix) that?

    #57996
    Barry
    Member

    The URL is passed through WordPress’s trailingslashit() function which ensures a trailing slash is present – as that is normally desirable in a WordPress environment.

    It’s probably possible to workaround this, but it would be great if you could point me to a live example. I’d also like to be clear on whether in your case all event URLs (from month view) should have the trailing slash removed or just those linking to an external ticketing service (and if so do you have some means of differentiating between those and ‘regular’ URLs)?

    #58008
    Nini
    Participant

    thanks barry – I’m experimenting with a test site

    http://planetscribble.com/dairy-test/

    If you click on test link to url July 31 rom the homepage calendar – you will see what is happening

    I will be pointing most of them to a different url for each but not all

    would removing the / from all of them impact the ones that are not pointing to an outside url?

    I could create a category for them if it would help

    thanks so much for your help

    #58022
    Barry
    Member

    OK, well for WP URLs normally if the trailing slash is missing it will automatically be appended (actually, it will redirect to the “correct” URL, but it amounts to the same thing).

    So I guess what you could do is add a new function definition to your functions.php file like this and then override the widgets/mini-calendar/single-event.php template (please see our Themer’s Guide if you are unsure how) and change any references to tribe_get_event_link() to tribe_get_unslashed_event_link().

    Does that help?

    #58128
    Nini
    Participant

    Thank you so much!! I will give that a whirl~

    #58565
    Rob
    Member

    Let us know how it goes, Nini. If you can confirm one way or another we can mark the answer/close the thread accordingly 🙂 Cheers.

    #58666
    Nini
    Participant

    Hi Robb – I tried it on my dev site http://planetscribble.com/dairy-tes and
    I was able to make the calendar widget work (for the aerial dance event on August 3rd at 2pm) – however I also want to make the calendar view do the same thing and It is not working there. I could not locate tribe-get-events-link() on the single-event.php in the-event-calendar/views/month/single-event.php. Is there a different process to deal with the main calendar view?

    #59193
    Barry
    Member

    Sorry for the delay getting back to you Nini – instead of tribe_get_event_link() they are using tribe_event_link() which also prints out the link.

    In the first instance can you try replacing that (and echoing) tribe_get_unslashed_event_link()?

    #59270
    Nini
    Participant

    Thanks Barry – I was able to locate
    tribe_event_link( $post )

    should I replace that with
    tribe_get_unslashed_event_link( $post )

    ?

    #59282
    Barry
    Member

    Try replacing it with:

    echo tribe_get_unslashed_event_link()

    I don’t think you should need to pass in the $post variable in these circumstances, but let me know if that doesn’t work for you.

    #59286
    Nini
    Participant

    Far Out!! – it totally worked
    Thank You!!

    #59305
    Barry
    Member

    Excellent, thanks for working through that with us – and good luck with the project 🙂

    #60161
    Barry
    Member

    Hi Nini – reopening this as you requested. If I understand correctly you are unable to override a specific template – can you clarify which template that is (I saw a number of different files in the email attachment you sent).

    #60172
    Nini
    Participant

    I created a new dev site
    http://planetscribble.com/dairydev/
    (different from the one in the forum cuz I wanted to do it in my theme folder)

    When I customized the single-event.php for my month view and my mini calendar view in the plugin folders they work – however I want to make the change in my theme folder so I don’t loose my change when I update the plugin, however it is not working
    here is a link to my screenshot of my directories I’ve created in my theme folder

    https://secure.helpscout.net/file/2292534/ad45671b7936f93beb5dc1d56ce479c90a6c6c01/Screen-shot-2013-08-10-at-11-39-04-AM.png

    p.s. the list view works fine – just not the calendar view or the mini calendar

    here is a screenshot of my directory

    I would so appreciate your wisdom on this

    #60173
    Nini
    Participant

    so – in other words

    3 template

    the mini calendar, the month view and the list view

Viewing 15 posts - 1 through 15 (of 29 total)
  • The topic ‘link event to url’ is closed to new replies.