Home › Forums › Calendar Products › Events Calendar PRO › Check if current page is a core page of tribe
- This topic has 5 replies, 4 voices, and was last updated 9 years, 5 months ago by
Bram Huisman.
-
AuthorPosts
-
October 13, 2016 at 7:47 am #1175928
Bram Huisman
ParticipantHi there,
I have a problem. All the content from my tribe plugins are not in a container (i am using bootstrap). I want to check if a page comes from one of my tribe plugins (event calander, event calander pro, event tickets, event tickets pro and filter bar) so i can place a page container only on these pages.
I am using sage as a starter theme for my project. Sage makes use of a theme wrapper, by doing that i don’t have to call get_header get_footer on every page. These files get called within the base.php. More information can be found here: https://roots.io/sage/docs/theme-wrapper/
I am also using the wp ultimate member plugin this plugin has a function called: is_ultimatemember() which gives me the opportunity to check if a core ultimate member page is visible.
So lang question short: is there a same like for event calander, event calander pro, event tickets, event tickets pro and filter bar?
October 13, 2016 at 10:02 am #1176075Nico
MemberHi there Bram,
Thanks for getting in touch with us! I can help you here 🙂
You can use the tribe_is_event_query to see if it’s an events related page. There are other conditionals to detect particular views in the calendar: tribe_is_month, tribe_is_week, tribe_is_day, etc.
Please give tribe_is_event_query a try and let me know if that works for you,
Best,
NicoOctober 14, 2016 at 1:46 am #1176427Bram Huisman
ParticipantHi,
Thx for the reply! Well i tried tribe_is_event_query() like this..
`<?php if ( tribe_is_event_query() ) {
echo ‘<div class=”container”‘;
include Wrapper\template_path();
echo ‘</div>’;
}
?>`
include wrapper/template_path() inserts all content.. but because the tribe plugin don’t actualy create pages i get’s outside te container.So is there a other way to include everthing in a container class?
-
This reply was modified 9 years, 6 months ago by
Bram Huisman.
October 17, 2016 at 1:24 pm #1177912Nico
MemberThanks for the follow-up Bram!
Not sure if I get the issue here, but I guess you’ll be able to sort this out by using just released full view shortcodes: Embedding Calendar Views with the [tribe_events] Shortcode. You can embed it in a page or just execute it with do_shortcode function.
Please let me know if that helps,
Best,
NicoNovember 8, 2016 at 8:35 am #1189163Support Droid
KeymasterHey 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 -
This reply was modified 9 years, 6 months ago by
-
AuthorPosts
- The topic ‘Check if current page is a core page of tribe’ is closed to new replies.
