You can check below code : change Page slug “gym-dashboard” as per your requirement.
<?php
function rt_include_gym_dashboard_page_template( $template ) {
if ( is_page( 'gym-dashboard' ) ) {
return plugin_dir_path( __FILE__ ) . 'templates/content-gym-dashboard.php';
}
return $template;
}
add_filter( 'template_include', 'rt_include_gym_dashboard_page_template', 99 );
Related Posts:
- Loading custom page template via plugin
- Setting a custom sub-path for blog without using pages?
- How to add custom content template part for a custom post type on main query using a plugin
- Add Content to Page without shortcodes
- How to set a fall back template for a custom post type in a plugin?
- How to quickly switch custom post type singular template?
- How to use a dedicated template for the Custom Post Type from a plugin?
- How do I Make a custom post type get a custom post template in a plugin
- How do I create a custom post type for a training CMS in WordPress?
- Create second custom 404 page for selected post type
- is_page_template not working as expected
- Help with CPT template pagination
- Using custom page templates with plugin [duplicate]
- Create Template for Custom Post Type same like for Page
- Getting template_include to work when allow_url_include is off?
- Filter widget outputs
- Custom post type pages return 404 page?
- Main query not querying any posts in custom taxonomy template
- Custom Empty Results page for my Custom Post Type
- Dynamic assign a custom template to custom post type posts
- How to get the current category with custom posts
- Custom permalink structure for remote content pages
- How can I allow users to edit text that will be displayed on a custom post type archive page?
- A certain theme is forcing it’s singular post layout
- Warning , Use of undefined constant PLUGIN_PATH?
- Question on templates
- Custom post type option page template
- get_permalink() of page the enclosing page not posts
- How can I find out what template is my custom post type using?
- Loading a template for a URL pattern
- Show Templates in Custom Post Type Editor
- Custom Homepage As Single Page or Custom Post Type?
- How to avoid hardcoded text in a custom page template?
- Using custom post types within a section of a template
- Custom Post Type Template Based on Page Slug?
- using a template for more then 1 page
- I want to show a list of posts under specified categories
- I want to show a list of post with title that have link goes to that post and icon under the specific category to which it belongs
- How to provide page_template path in custom plugin using WordPress
- Custom post type template not loading from plugin
- How can I allow plugin users to define layouts for a custom post type
- Add block templates (html) via plugin for custom post type
- Problem with adding custom post type meta to header by plugin
- Validate Custom Post Type fields
- How do I display child post types in the parent post type template
- Creating alternate meta box context locations
- Get template part with CPT and Custom Taxonomy conditionals
- Is it possible to sort metabox teaxtarea values?
- Create a select metabox that the user can pupolate?
- Template code to split a post and print a custom field?
- Displaying a list of Contacts
- How to create a template to show child terms of a MAIN taxonomy
- Generating and downloading files with WP API
- How to change single custom post template by custom taxonomy?
- How can I modify a custom post type and custom page template for a child theme if all content seams to be handled by theme’s ‘native’ plugin?
- Custom Post Type homepage template
- Types plugin custom post add_action hooks
- How to add page under a custom post type?
- shopping cart plugin development
- Enabling permalinks disables custom page template
- Convert Custom Table Data Based Plugin To Be Searchable
- Setting a homepage – doesn’t seem to work
- Custom Post Type Specific Post Template
- How to create a archive template for custom post type [duplicate]
- How do I show content from a plugin using the template the site is currently working with?
- Modify a plugin function output from another plugin
- WP not recognizing custom post type / template
- Mixing Custom Post Types and Page Templates in WordPress 3.7.1
- How to List Custom Post Type Titles Based on Theirs Taxonomy Terms Inside a Nested Loop
- CPT to installable Plugin
- how can i show a google map in custom post type
- Archive Template being used instead of Category Template for Custom Post Type
- Custom post type draft use wrong template
- List of a specific Custom Post Type in Custom Template
- Custom Post Type Template Insert not working properply
- Create a custom taxonomy template that loops through child categories in term order?
- Load php file with jquery in single.php
- Display Posts Query with IF function
- My template won’t apply, theme still fallback to index.php
- Most viewed post of custom post type
- How can I add in post’s the text “No content”
- filter the_content, custom post type, and wp_query
- Custom rewrite rules for /pastissues/%category%-%postname%.html
- Loop and add Specific Categories and Products Images
- Require custom post type if is_admin() – template doesn’t show up?
- Fill custom fields when saving custom post types
- custom post template ignored after altering permalinks
- How to customize `Edit-Post` Screen
- Calling a div and content in php?
- Content in WP Editor displayed below CPT shortcode [duplicate]
- Tag template not returning posts [closed]
- Set generic reservation form for custom post type
- How add column from new table in Custom Post Listing (admin)
- Custom Post Type page template doesn’t show up
- Function to allow single post template based on custom taxonomy?
- Writing a custom Glossary plugin
- Shortcode in pages or tempate files for custom post type
- One Custom Post Type two different Templates
- Specifying a template for custom post type pages
- Using get_terms() to list terms from one custom taxonomy AND from one specific built-in category