Yes, get_template_part
will always look in the theme. It uses locate_template
which is hard-coded to use STYLESHEETPATH
and TEMPLATETPATH
I don’t know exactly what you mean about using a “partial template”, but if you mean “can I include part of a PHP file?” then no. It is all or nothing. You need to break your file into multiple files or break the file’s contents into granular functions that you can call as needed.
Related Posts:
- Is it possible to stop selected plugins from loading on certain template pages?
- Plugin-generated pages use Not Found or Pages Archive templates?
- Create custom page templates with plugins?
- Is there a WordPress plugin that registers a plugin file as a custom page template?
- Ways to have multiple front-page.php templates that can be swapped out?
- How can I have two different urls for the same page that load two different templates?
- How do I make my wordpress page more friendly for mobile viewers?
- Check javascript file Proper way in functions.php
- Should I use RIPS tool to test my themes and plugins?
- Returning Variables back into a template
- Template plugin for blog posts? [closed]
- Workflow and best practice for documentation [closed]
- Is there a quick way to inject i18n domain into theme/plugin files?
- Translating plugin inside the theme [closed]
- Why are some of my thumbnails not being generated?
- Include Max mega menu Plugin into theme
- wordpress theme backend admin only
- More than one text-domain is being used because of the included templates for plugins
- How to get current post user id
- Single Page theme [closed]
- Different UI in WordPress
- Register Page Template from Plugin
- The problem with WordPress Importer
- (FES EDD) New vendor submission page is blank
- Classified ad website : which solutions to use? [closed]
- Advanced Custom Field DatePicker [closed]
- Finding the URL to be used to check if plugin is installed with a theme
- How can I position ShareThis buttons manually when using the plug-in? [closed]
- Is there any hook for theme activation ? or something similar?
- How do I combine a theme with a plugin
- how to force tag page layout to use same as search layout?
- How to write “alt” tag in image for wordpress code?
- Use different single.php file based on condition
- Include Minit plugin in theme [closed]
- How can I use my custom wordpress theme on two websites? [closed]
- why need theme,if page builder is there in wordpress [closed]
- Inserting Plugins Into Blank Space of Externally Designed WordPress Theme
- Custom form not showing in correct place on page
- Don’t load the theme for a page FROM a plugin EDITED
- Extending a theme: build new features as plugin or core modules?
- Ajax Call in page theme not working?
- How do I show content from a plugin using the template the site is currently working with?
- how to design change in woocommerce cart page and all other page also by theme? [closed]
- display unique post per category
- How do you create a re-useable HTML fragment in wordpress
- Pull comments from one page/post into another page/post?
- Identify current wordpress theme
- Removing the custom_image_header from wp_head
- use EDD Content Restriction for restricting php in template
- Elementor Sidebar not loading when PRO elements plugin is active
- How to override any plugin file in the child theme
- how to display a template.php in a shortcode
- Mobile Menu and Mobile Sidebar missing
- WordPress hierarchy clarification, does post_type_archive take precedence over taxonomy-term archive?
- How to get a post views count using ‘WordPress popular posts’ plugin
- when i activate my WordPress plugin cannot see customizer options or preview
- How to prevent redoing get_posts queries and make results available to other scripts?
- 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
- When the user entered an unauthorized url redirect to login page
- how to add custom css at top above all css file for specific url
- How can I add a custom checkbox / radio button on the admin theme options to display a CSS or other?
- 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?
- Disqus plugin outputs script as literal text
- Breadcrumb is not generating the correct post page url
- Site is setup statically – how to make it content managable?
- How to work email subscribe in WordPress?
- WP Customer Reviews call short code on another page [closed]
- Javascript as Jquery Function Call?
- Editing a theme
- Divi Template A Few Questions
- How to escape html code?
- My Blog page ( posts page ) theme isn’t changing with the new theme [closed]
- What is the point of using the front-page.php template? [closed]
- How to create an Info Box on WordPress [closed]
- How to make content as required in custom post type?
- How to provide page_template path in custom plugin using WordPress
- How to create new title and its description inside a section in WP Customizer?
- Newspaper theme, custom query vars, & custom rewrite rules
- Page not found when I click anything on my website
- WordPress API functions not working at AJAX functions.php call
- What’s the right way to implement functions in footer.php
- Create theme for mobile phones and tablets only?
- Should meta boxes for specific pages be save in their own plugins?
- Call a function for social sharing
- I want to use wordpress themes and plugin to develop website
- Blocking Plugin Css to load custom in template directory
- Cannot add edit themes and add plugins after multisite update
- Detect plugin/theme installation (via upload)
- Hardcode a form in Contact Form 7 [closed]
- Remember the Meta Value With Radio Buttons
- Load CSS files in header of Bones theme?
- reCAPTCHA on page template without plugin
- Woocommerce – Change Variable Product Add to Cart to behave like external product using Custom Field (link) [closed]
- How to check homepage contain blog post?
- How to handle a WordPress blog with articles in different languages?
- is there a way to pass a parameter to a add_menu_page function?
- Is it possible for a plugin to prevent certain plugins from being installed?