Home › Forums › Calendar Products › Events Calendar PRO › link event to url
- This topic has 28 replies, 4 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
July 31, 2013 at 7:22 am #57975
Nini
ParticipantHi – 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?
July 31, 2013 at 8:35 am #57996Barry
MemberThe 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)?
July 31, 2013 at 9:02 am #58008Nini
Participantthanks 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
July 31, 2013 at 9:46 am #58022Barry
MemberOK, 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?
July 31, 2013 at 2:03 pm #58128Nini
ParticipantThank you so much!! I will give that a whirl~
August 2, 2013 at 1:51 pm #58565Rob
MemberLet us know how it goes, Nini. If you can confirm one way or another we can mark the answer/close the thread accordingly 🙂 Cheers.
August 3, 2013 at 7:55 am #58666Nini
ParticipantHi 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?August 6, 2013 at 4:54 pm #59193Barry
MemberSorry 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()?
August 7, 2013 at 7:58 am #59270Nini
ParticipantThanks Barry – I was able to locate
tribe_event_link( $post )should I replace that with
tribe_get_unslashed_event_link( $post )?
August 7, 2013 at 8:34 am #59282Barry
MemberTry 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.
August 7, 2013 at 8:48 am #59286Nini
ParticipantFar Out!! – it totally worked
Thank You!!August 7, 2013 at 9:25 am #59305Barry
MemberExcellent, thanks for working through that with us – and good luck with the project 🙂
August 13, 2013 at 7:47 am #60161Barry
MemberHi 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).
August 13, 2013 at 9:05 am #60172Nini
ParticipantI 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 folderp.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
August 13, 2013 at 9:07 am #60173Nini
Participantso – in other words
3 template
the mini calendar, the month view and the list view
-
AuthorPosts
- The topic ‘link event to url’ is closed to new replies.
