"All Events" Link wrong route

Home Forums Calendar Products Events Calendar PRO "All Events" Link wrong route

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1537986
    pavlov
    Participant

    i am using the shortcode to display a single category on the calendar.
    it works great. but on the month view. i have it set to only show 3 events a day. then it shows a “view all event” link. but the link takes me to the main event calendar page with every event.

    month view with category promotions url.
    http://dev-starcasino.pantheonsite.io/mahnomen-home/promotions/?tribe_event_display=month

    when i click on the view all events link, it takes me to the following URL.
    http://dev-starcasino.pantheonsite.io/events/category/mahnomen/2018-05-10/?tribe_event_display=month

    the shortcode i am using: [tribe_events view=”list” category=”mahnomen”]

    ========================
    PLEASE LEAVE FOR SUPPORT
    Reporting the same issue as: https://theeventscalendar.com/support/forums/topic/single-event-all-events-link-wrong-route/

    #1538164
    Sky
    Keymaster

    Hello,

    I’m sorry to hear that you’re having issues with the category links. I will try to help you figure out the problem.

    Can you explain what you mean when you say that the links take you to the “main event calendar page?”

    When I click on any of the “View All X Events” links within the calendar on your site, I am taken to a list view of all the events that take place on that particular day, as expected.

    If you are experiencing something different than this, can you show me a screenshot of what you are seeing when following the link?

    Or perhaps I am not fully understanding your question?

    Thanks,
    Sky

    #1538267
    pavlov
    Participant

    i have a page called Promotions it has the shortcode [tribe_events view=”list” category=”mahnomen”]
    http://dev-starcasino.pantheonsite.io/mahnomen-home/promotions/
    if you are on this page and you switch to month view on the filter bar. and you click on “View All X Events” link. it take you to the category list view of the standard ‘/events’ page, but i want it to go to the category list view on the promotions(/promotions) page where the shortcode is.

    #1538834
    Sky
    Keymaster

    Hi again,

    Thanks for clarifying! I now see what you’re describing. Unfortunately, this is how the plugin is set up to work. You could customize this functionality, though this level of customization may be a bit beyond the scope of what I can do for you here in the support forums.

    I’d be happy to get you started by pointing in the right direction, and answer any questions you may have about the customization process. To make this change, you would need to copy and modify one of the month view templates. The specific template is located at the-events-calendar/src/views/month/single-day.php. You can copy this file into your child theme, in [your-theme]/tribe-events/month/single-day.php, and add custom logic to generate the link.

    For more information on working with custom templates for the Events Calendqr, check out our Themer’s Guide.

    The URL structure to get the results you are looking for without leaving the page would look like this: http://dev-starcasino.pantheonsite.io/mahnomen-home/promotions/?tribe_event_display=day&tribe-bar-date=2018-05-27

    So basically, if you can grab the current page URL and append “?tribe_event_display=day&tribe-bar-date=” on the end, and add on the date, it will show the single day’s events in the correct category without breaking your custom URL pattern at the root.

    The specific date can referenced with “$day[‘date’]”

    Here’s a more specific example:

    https://gist.github.com/skyshab/1dc98aa9f272b9e5f50ab4c66ab65067

    Just replace the link at the bottom of the single-day.php template with something like the above.

    Hope that helps!

    Please let me know if you have any other questions.

    Thanks,
    Sky

    #1544235
    pavlov
    Participant

    This reply is private.

    #1545594
    Sky
    Keymaster

    Great! Glad I could help!

    Please let us know if you have any questions or issues in the future.

    Thanks,
    Sky

    #1561847
    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 7 posts - 1 through 7 (of 7 total)
  • The topic ‘"All Events" Link wrong route’ is closed to new replies.