Home › Forums › Calendar Products › Events Calendar PRO › Code for single event view
- This topic has 12 replies, 6 voices, and was last updated 8 years, 10 months ago by Support Droid.
-
AuthorPosts
-
November 14, 2011 at 3:35 pm #11076Cary BergeronParticipant
So on single event views like here http://www.gocolorado.com/event/test-event/ there are some items that I have showing up on single posts like the share links and join discussion but they are showing up on the event pages. I have tried removing them in an if statement using is_page_template(‘ecp-single-template.php’) and also using ‘tribe_events’ == get_post_type() but neither are working. What can I use to target all single event pages?
November 14, 2011 at 4:42 pm #11080RobMemberThat’s a good question, Cary. Let me get Jonah to chime in – expect a response from him over the next 24 hours.
November 15, 2011 at 9:52 am #11100BrandonMemberI’m curious about this myself. I have an if statement using ‘tribe_events’ == get_post_type() to echo a specific div id but it’s not working. An answer to Cary’s question will probably help me as well.
November 15, 2011 at 11:41 am #11109Nick CiskeParticipantUse tribe_is_event() as your conditional. That’s true for all event pages (including the main calendar).
November 15, 2011 at 11:53 am #11111Cary BergeronParticipantAwesome it worked thanks again!
November 15, 2011 at 11:53 am #11112Cary BergeronParticipantAwesome it worked, thanks again!
November 15, 2011 at 11:55 am #11113JonahParticipantHi Cary,
Try:
if(is_single() && ‘tribe_events’ == get_post_type()) {
//your code here
}
Regards,
JonahNovember 15, 2011 at 11:56 am #11114JonahParticipantHi Cary,
Try using:
if(is_single() && ‘tribe_events’ == get_post_type()) {
//code to run
}
Regards,
JonahNovember 15, 2011 at 3:51 pm #11137RobMemberThanks Nick.
November 15, 2011 at 8:59 pm #11149JonahParticipantHi Cary,
Also try using:
if(is_single() && ‘tribe_events’ == get_post_type()) {
//code to run
}
Regards,
JonahNovember 15, 2011 at 8:59 pm #11150JonahParticipantNote: fix the single quote in the code above 🙂
November 16, 2011 at 9:11 am #11170RobMemberThanks guys!
July 2, 2015 at 7:33 am #974629Support DroidKeymasterThis 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. -
AuthorPosts
- The topic ‘Code for single event view’ is closed to new replies.