Previous and Next Events

Home Forums Calendar Products Events Calendar PRO Previous and Next Events

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #943459
    Sharlene
    Participant

    Hi

    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.
    S

    #943488
    Josh
    Participant

    Hey 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!

    #943503
    Sharlene
    Participant

    Thanks 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

    #943863
    Josh
    Participant

    Hey 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!

    #944609
    Sharlene
    Participant

    Hi 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
    S

    #945032
    Josh
    Participant

    Hey 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!

    #983781
    Support Droid
    Keymaster

    This 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.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Previous and Next Events’ is closed to new replies.