Remove the Next and Previous Event Links with a function?

Home Forums Calendar Products Events Calendar PRO Remove the Next and Previous Event Links with a function?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1295335
    Anders
    Participant

    Hi there,
    I’d like to remove the links to the next and precious event in the single view.
    I am aware of the solutions that point to either cheating with some css (display:none) or editing the theme file for single view.

    Is it possible to instead use a function to remove this pagination? That would be awesome. Thanks.

    /anders

    #1296858
    Andras
    Keymaster

    Hey Anders,

    Thanks for reaching out with your question.

    I’m not quite sure that is possible. There’s a function call for generating the urls, maybe that could be influenced to return an empty string but you would still have html markup left.

    I believe your best bet would be creating a template override of the single event view. If you need some help with that let me know.

    Cheers,
    Andras

     

    #1296860
    Andras
    Keymaster

    Anders, this would be the snippet you need to put in your theme’s functions.php file:

    add_filter( 'tribe_the_prev_event_link', '__return_empty_string' );
    add_filter( 'tribe_the_next_event_link', '__return_empty_string' );

    But as said you would still be left with some remnant html code.

    Hope this helps.

    Cheers,
    Andras

    #1315901
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Remove the Next and Previous Event Links with a function?’ is closed to new replies.