You can use single_template
filter hook.
/* Filter the single_template with our custom function*/
add_filter('single_template', 'my_custom_template');
function my_custom_template($single) {
global $post;
/* Checks for single template by post type */
if ( $post->post_type == 'POST TYPE NAME' ) {
if ( file_exists( PLUGIN_PATH . '/Custom_File.php' ) ) {
return PLUGIN_PATH . '/Custom_File.php';
}
}
return $single;
}
Related Posts:
- Tips for using WordPress as a CMS? [closed]
- Themes VS Plugins [duplicate]
- A way to sort WordPress themes? [closed]
- Is it possible to use WordPress as an online portfolio for text content? What kind of theme would I look for?
- Creating themes using the one Plugin (Toolkit)
- How to make content as required in custom post type?
- Adding a Taxonomy Filter to Admin List for a Custom Post Type?
- How to structure a plugin
- Shared functionality in plugins and themes
- How to add favicon to my site – in both front end and admin panel
- Create theme files for plugin
- How Do I Use The WordPress Plugin Posts 2 Posts by Scribu?
- Reordering themes in admin panel
- Need to create a Theme demo site that features multiple themes
- How get list of updates of wp site?
- Custom database or Custom Post Types?
- How can I list only sites that use a particular theme or plugin?
- Prevent page slug from interfering with custom post type archive permalink?
- disable active plugins for specific theme
- Should I use RIPS tool to test my themes and plugins?
- Make the css of the widget overwrite theme css
- Can a WordPress plugin or theme contain a virus?
- Plugin “Meta Box”: Implementing meta boxes in custom post type
- register_theme_directory somehow “fails” when folder is outside of WP-Folder
- WordPress site migration addvice
- Hide Meta Boxes for Non-Admins
- Plugin allowing for artists, events and venues
- Disable Other Plugins on my Custom Post Type?
- How to get images from EDD post?
- custom taxonomy and custom post type url conflict
- Making menu link open in new tab?
- add_meta_box (Will display only in specific page admin WordPress)
- RW Meta Box ,Problem setting post title
- Only Homepage not loading properly
- get_post_type on post.php
- Keep a post copy when this one is updated – issue
- Installing plugins and using complex folder structure with child theme in WordPress
- Adding CSS to custom post type admin page causes error
- Redirect to another page using contact form 7? [closed]
- How to get path or root of plugin folder, not file or dir?
- How to check if my wordpress websiste is nulled or not?
- Remove specific plugins and themes from the Dashboard->Updates page [duplicate]
- Does heavy theme and plugins affect server’s response time? [closed]
- Theme Custom Pages
- how remove font to increase site speed load
- Sticky option for custom post types without using custom fields or plugins
- How to get theme’s info from wordpress.org/themes using api.wordpress.org?
- How to find the list of custom post type where logged in user is author
- What is the purpose of WP_CONTENT_URL?
- why need theme,if page builder is there in wordpress [closed]
- speed up pagination for huge database
- Can I assign a theme to a custom post type?
- 2 wordpress site same database
- How to Include Custom Post Content From Plugin
- What hook can I use to modify custom post data before it is displayed on the page?
- How to check homepage contain blog post?
- how to design change in woocommerce cart page and all other page also by theme? [closed]
- Is it possible for a plugin to prevent certain plugins from being installed?
- How do you create a re-useable HTML fragment in wordpress
- Disable plugin visibility at the plugin directory
- Creating teams of users in WordPress
- Identify current wordpress theme
- Share plugins, themes, and multi post in a multidomain network
- Removing the custom_image_header from wp_head
- Elementor pro page editing gives error There has been a critical error on this website. Please check your site admin email inbox for instructions
- Can’t load the the canges of field groups [duplicate]
- How to display emails as a post?
- Javascript console errors and WSOD on edit post pages
- Register PODS Custom Field with WPGraphQL [closed]
- Adding custom post category to categories widget
- Custom Post Type with Sequence ID
- How to arrange custom posts in the backend/admin by custom taxonomy
- Adding LOAD MORE on a page
- How Can I Create A Form In WordPress For Subscribers To Alert Them about new Listing posted?
- Link custom post type to page
- How to disable a widget area of a specific page?
- Showing different js file for different theme in wordpress customizer api
- Seeking specific WordPress Layout
- Can we rename a plugin directory for a already launched plugin?
- WordPress Theme/Plugin Install (about FTP Connection)
- WordPress core update fails – no issues with plugin updates
- Why the output of an image gallery plugin is not displayed into a page of my custom theme?
- How to add the functionality of WordPress needed to be installed to be mandatory while installing themes
- Incentive theme – Getting ’You do not have sufficient permissions’ while trying to install plugins
- How do I make the selected layout display for all MarketPress pages?
- get recent 12 days post then random in wordpress
- Issues with Post 2 Post Plugin
- Can’t get custom user meta to show in header
- How to list the categories by custom taxonomy created?
- How to make only selected posts appear on a selected wordpress page
- Terms id wordpress error
- How to laod wp_enqueue_style to another header i created my self
- How to make wordpress backend mobile optimized.?
- Looking for a plugins for organization portal (Staff, Units, Departments)? [closed]
- How to get ‘Products’ on home page?
- wordpress illegal string offset ‘parameter’ error
- What is phpBB? Is it something like a plugin which I can use in WordPress? [closed]
- Is there a way to stop the theme and especially plugins listed?
- Links not opening as they should. Custom WP plugin
- How to add links to different language versions of WordPress