How to check if I’m on a "virtual page"

Home Forums Calendar Products Community Events How to check if I’m on a "virtual page"

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #153493
    arcanepsyche
    Participant

    I understand that for Community Events the pages like /events/your-events/add are “virtual” meaning they are not real pages with meta data and such. However, in my custom theme, the layout and content of the sidebar of a page is determined by the slug of that page. For instance, another page on my site called “Articles” with a slug of “articles” which automatically loads a sidebar file called “sidebar-articles.php” based on the page’s slug.
    So, since the virtual pages don’t have slugs, is there another way to determine whether the user is visiting a virtual page as opposed to a real page? Like a function or something?

    #153841
    Casey
    Participant

    arcanepsyche,
    Thanks for getting in touch! The Community Events add-on has two ‘virtual pages’ that you can check for by using the following template tags:

    • tribe_is_community_edit_event_page() – Returns true if displaying the ‘Edit’ or ‘Submit’ Event form
    • tribe_is_community_my_events_page() – Returns true is displaying the ‘My Events’ list page

    For further information on the template tags available with the Community add-on, take a look at the Community Documentation. Let me know if that gets you pointed in the right direction, or if you have further questions. Thanks! 🙂

    -Casey-

    #160657
    Casey
    Participant

    I just wanted to follow up and see if you’re all set here or if you still have further questions. Just let me know if you have further questions or if I should go ahead and close out this thread. Thanks! 🙂

    -Casey-

    #208890
    Casey
    Participant

    Since I haven’t heard back from you here, I’m going to go ahead and close out this thread. Feel free to start a new thread if you have further issues. Thanks! 🙂

    -Casey-

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘How to check if I’m on a "virtual page"’ is closed to new replies.