Home › Forums › Calendar Products › Events Calendar PRO › Previous and Next Events
- This topic has 6 replies, 3 voices, and was last updated 10 years, 10 months ago by
Support Droid.
-
AuthorPosts
-
February 18, 2015 at 4:06 pm #943459
Sharlene
ParticipantHi
The headings of the previous and next events which appear at the top and bottom of an individual event is confusing for users. Is it possible to change these headings to be Previous Event and Next Event in the same way those appear on the List View and if so, how/where do I do that?
Thanking you.
SFebruary 18, 2015 at 6:37 pm #943488Josh
ParticipantHey Sharlene,
Thanks for reaching out to us!
You can modify these links by filtering the “tribe_the_prev_event_link()” and “tribe_the_next_event_link()” filters. With these filters, the “$anchor” is what is controlling the text that the link is being applied to and displaying on the single events template.
Let me know if this helps.
Thanks!
February 18, 2015 at 9:33 pm #943503Sharlene
ParticipantThanks Josh
Unfortunately I don’t know much about php so filtering and the links you sent, I did not understand. Is there a php file where I can just change the text?
S
February 19, 2015 at 9:25 pm #943863Josh
ParticipantHey Sharlene,
No problem.
You can modify these by adding the following code into your theme’s “functions.php” file. When adding, be sure that you add it before the closing “?>” tag at the bottom of that file.
add_filter( 'tribe_the_next_event_link', 'custom_next_link' ); function custom_next_link() { return tribe_get_next_event_link( 'Next Event »' ); } add_filter( 'tribe_the_prev_event_link', 'custom_prev_link' ); function custom_prev_link() { return tribe_get_next_event_link( '« Previous Event' ); }Let me know if this helps.
Thanks!
February 24, 2015 at 3:55 pm #944609Sharlene
ParticipantHi Josh
I could not find ?> at the end of the functions.php file so I tried your code just at the very end of the file anyway but that gave me a white screen on both the front and backend.
Let me know if you want me to send a copy of the functions.php file.
Thanking you
SFebruary 26, 2015 at 12:21 pm #945032Josh
ParticipantHey Sharlene,
I’m sorry that you’ve had issues implementing the previous code. You could try placing the code at the beginning of your functions file by placing just inside the opening “<?php” tag. This usually isn’t the best place to place functions however it sounds like the bottom of your functions file might be left within an open function.
Let me know if this helps.
Thanks!
July 7, 2015 at 6:31 am #983781Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Previous and Next Events’ is closed to new replies.
