Add View to View As

Home Forums Calendar Products Events Calendar PRO Add View to View As

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1282455
    Joseph Coppola
    Participant

    I created another view for the Events, however its a table on a page that pulls the data from Events Calendar pro. How can I add a link to the page in the View As list?

    #1282750
    Cliff
    Member

    Hi. I’m always glad to hear about user customizations like this!

    I believe you’d use the tribe-events-bar-views filter, like is done in this file to add Map View to the Tribe Bar’s list of views: /wp-content/plugins/events-calendar-pro/src/Tribe/Geo_Loc.php

    Please let me know how this goes for you.

    #1282924
    Joseph Coppola
    Participant

    This really isn’t much of a help. What files am I supposed to edit? Where am I supposed to edit them? What code do I need to add?

    Please help.

    Joe

    #1283301
    Cliff
    Member

    I appreciate your question and the desire to customize it for your use. However, we cannot provide such in-depth customization help, per our Scope of Support / Terms.

    Since you said you already created another view, I assumed you had a template file you wanted to load at a specified URL. The suggestion I shared was how to add the link to the Tribe Bar’s view switcher.

    You’ll need to know WordPress coding basics to leverage the filter I suggested. Additional coding might also be needed to accomplish your customization.

    If you need some coding help, you may want to ask your developer or reference our documentation and list of known customizers.

    #1283440
    Joseph Coppola
    Participant

    You actually did not answer anything. You mention this.

    “tribe-events-bar-views filter”

    Without any reference of where to find it, what PHP page its on, nothing.

    Also coding help is provided via this forum there are several articles written about stuff like this.

    Joe

    #1283937
    Barry
    Member

    Hi Joe,

    Thanks for your patience – it sounds like an interesting piece of work that you’re building 🙂

    Also coding help is provided via this forum there are several articles written about stuff like this.

    We do indeed have a bunch of knowledgebase articles that aim to steer folks in the right direction for any custom dev or theming work they might like to undertake and occasionally we do also go into more depth on the forums.

    In general, though, if you need to build something like you have described, it’s up to you to figure out a way. We can try and guide you – as Cliff has already done – but ultimately there may be gaps you need to fill in yourself. If you’re not familiar with WordPress development, that may entail seeking help from others who are at home with this sort of work.

    You actually did not answer anything. You mention this

    “tribe-events-bar-views filter”

    Without any reference of where to find it, what PHP page its on, nothing.

    Well, Cliff did already provide a reference to a place in the source code where this hook is used:

    wp-content/plugins/events-calendar-pro/src/Tribe/Geo_Loc.php

    That’s a really great example of adding a view. To provide some further detail: often, this hook is triggered when the tribe_events_get_views() function is called – for example, you can see a call to this function from within the modules/bar.php template (see here for details about our templates and overriding them).

    Within the above file (Geo_Loc.php) noted by Cliff, you can see how we take advantage of this ourselves:

    • In the constructor (around line 96) we use the add_filter() function with this hook
    • Further down, in the setup_view_for_bar() method (around line 225), you can see how we actually register the view

    I hope that helps. In terms of where you should put your own code, that’s more of a general WP development question, but there are a number of different approaches:

    I do not advise trying to modify core plugin code, though, as your changes will inevitably be lost next time you update (besides potentially making it harder for us to support you).

    I hope that helps and good luck with the project!

    #1293824
    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 ‘Add View to View As’ is closed to new replies.