You can get the post id outside the loop with $wp_query
and then feed it to tribe_is_event()
. works a treat.
<?php
global $wp_query;
if (tribe_is_event($wp_query->post->ID)) {echo "yup"; } else {echo "nah"; }
?>
Related Posts:
- How to make plugin required in a wp theme without using php conditional statements when calling an individual function from that plugin?
- How to share category taxonomy with custom post type (The Event Calendar plugin)
- Can I make plugins required?
- Automatically install wordpress plugin at theme activation
- When coding a WordPress theme, where does the theme (i.e. the presentation) end and the plugin (i.e. the functionality) begin?
- Can we completely remove the WordPress Sitemaps (WordPress 5.5)?
- WordPress tips for speed and performance [closed]
- How to access options of Redux framework in front end
- Update Multiple Post Meta for the Same Post In One call?
- How to hide fields from my user profiles
- How to make my plugin theme-independent?
- How to load a new template page according to a particular URL?
- Translate third party plugin and save translation files in custom theme
- Add custom buttons with custom actions in Edit Post screen in WordPress?
- Code in theme functions.php faster than with a plugin?
- How do I future proof my older WordPress theme?
- Workflow and best practice for documentation [closed]
- register_theme_directory somehow “fails” when folder is outside of WP-Folder
- Display future posts?
- Date in the URL with The Events Calendar
- How to retrieve custom meta term of category taxonomy from WP Rest API?
- How to use get_theme_mod in gutenberg editor wordpress?
- How to stop or remove an action being called inside a function of an extended class
- How to Display a Plugin function (content) on frontpage using index.php
- How to make a slideshow shortcode based on the WordPress gallery shortcode? [closed]
- All of my custom posttypes are 404’ing
- Classified ad website : which solutions to use? [closed]
- What are the specifics of WordPress development I need to know? [closed]
- Calendar Plugins – Featured Widget [closed]
- Finding the URL to be used to check if plugin is installed with a theme
- Js file is not adding using this code in functions.php
- Jquery NoConflict Problem
- Redirect to another page using contact form 7? [closed]
- WP_Query for custom post type and category_id not working
- multiple language website navigation menu suggestion
- Add SideBar/Widgets Just Below the Post
- Add filter on html tags,attributes on specific function in wordpress
- plugins not working in custom theme
- Release the plugin in the WordPress repository where redux is used
- How can I support plugins in a custom theme?
- How to use the CSS of the WordPress core in the development of my administration page?
- Redeclare function after plugin activation
- What is the purpose of a companion plugin
- Remove Pagination for Product Category Pages WooCommerce
- why need theme,if page builder is there in wordpress [closed]
- Add user meta after a user has registered and logged In [closed]
- Visual Composer: Where do I find the source code of a custom element?
- Changing the Organize Series Listing Pages
- WordPress API functions not working at AJAX functions.php call
- What’s the right way to implement functions in footer.php
- Hardcode a form in Contact Form 7 [closed]
- How do you create a re-useable HTML fragment in wordpress
- Override methods in Yoast SEO breadcrumb class
- Identify current wordpress theme
- Update WordPress Theme System
- Strange Behavior on New Theme Points to Idiocy
- Code for unique user visit count on every page WordPress
- need to find duplicated meta value in custom filed and view the posts that have the same value
- Widgets are not displaying in the admin panel
- submit two file input fields in the same form
- Newbie problem with adding include wp_footer
- Content-Security-Policy implementation with WordPress W3Total Cache plugin installed
- woocommerce: Customize email with item total count
- Child theme modifications not showing up
- Submitting form to PHP
- how to change a static testimonials into dynamic
- Rename a folder via HTML POST request
- My wordpress local urls is still displayed even moved to live
- How can I see $post object in frontend from functions.php?
- when i activate my WordPress plugin cannot see customizer options or preview
- Showing different js file for different theme in wordpress customizer api
- Change Jobs for WordPress templates
- WordPress panel is not loading after plugin activated with error: HTTP ERROR 500
- How to wrap image tag into div for post only?
- Add section (add_settings_section) to a custom page (add_submenu_page) not working
- Where do the section input fields values are stored in database
- How can I add a custom checkbox / radio button on the admin theme options to display a CSS or other?
- Is it possible to restrict content in wordpress?
- Display Powerpress media url
- Why the output of an image gallery plugin is not displayed into a page of my custom theme?
- Convert HTML5/CSS3 site to WordPress Theme (need a lot of plugins) or just use the API?
- twitter widget loads properly in all themes except my own theme?
- Plugin’s required JS not being inserted in my theme
- How to copy data from user profile page (profile.php) to theme customizer
- Can anyone tell me why I can’t edit a plugin when it is installed without having to re-install?
- What is the Object for WP_Error Class?
- Disqus plugin outputs script as literal text
- Breadcrumb is not generating the correct post page url
- Replace all media (images)
- WooCommerce custom query and paging: Not Found error
- Integrating WordPress Content into a jQuery Slider
- How can I convert a complete bootstrap template into a WordPress template? [closed]
- Custom GD Star Ratings Stars [closed]
- Email Masking in widget
- manage_{taxonomy}_custom_column not working
- Is website for online game guides doable in WordPress? [closed]
- add_meta_box showing blank screen in my page
- How to create an Info Box on WordPress [closed]
- How to make content as required in custom post type?
- What are Seeds? [closed]