Category designation on tribe_get_next_month_link()

Home Forums Calendar Products Events Calendar PRO Category designation on tribe_get_next_month_link()

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #51185
    Brian
    Participant

    Hi,

    Is there any way to change the following function to make sure the event category slug is added to this output: http://pastebin.com/Rgj9kK7p

    when using tribe_get_next_month_link() and tribe_get_previous_month_link() in a custom template?

    #51246
    Jonah
    Participant

    Hi Brian,

    It might be possible. Can you give me an example of why you would want to do this?

    – Jonah

    #51249
    Brian
    Participant

    Hi Jonah,

    I have about 30 “Program” pages , and each program has it’s own calendar of events (a specific category) . So, on each program page, I’m using all of the code from the gridview etc scripts to display a gridview calendar , with a customized query to show only events from each specific category.

    I wouldn’t want to change that function across the entire site though, just for these custom template pages.

    Works perfectly, until you click to any month forward or back. The ajax loads the next month for example when you click “July”, but it loses the query and shows ALL events .

    I had previously asked you if I could stop the pjax from changing the URL but then realized that even doing that wouldn’t stop the query from losing the category.

    The ECP category grid view pages work perfectly (moving through the months, it still knows to only show the category you’re viewing), and that’s pretty much the functionality I need to replicate in a custom template .

    I can’t figure out any other way to accomplish this. Ideally, I could do this tribe_get_next_month_link(‘tribe_events_cat=5’) if parameters were accepted in that tag, but I understand they are not.

    My final solution I may have to end up using is an iframe of each category page and see if that will work.

    Thanks for any recommendation you could provide or ideas Jonah

    #51365
    Jonah
    Participant

    Hi Brian,

    I’m not sure how to do this myself but am checking with one of our developers to see if something is feasible without too much work. Stay tuned!

    Thanks,
    – Jonah

    #51768
    Jonah
    Participant

    Hi Brian,

    Sorry about the delay in getting back to you on this. Unfortunately this is not easily achievable right now in the 2.x code, but it will be easier in 3.0 which is coming out soon. The template tag will be filterable in 3.0 which means you’ll be able to detect if you’re on a category and modify the links accordingly if so. We cannot help you with this in 2.x but should be able to provide some pointers once 3.0 comes out.

    Let me know if you need anything else.

    – Jonah

    #51772
    Brian
    Participant

    That’s awesome Jonah, thanks! Can’t wait for 3.0

    #51788
    Jonah
    Participant

    I hear that Brian, me too. If there’s anything else you need help with, please let us know.

    Regards,
    Jonah

    #979232
    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 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Category designation on tribe_get_next_month_link()’ is closed to new replies.