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
- What Are Security Best Practices for WordPress Plugins and Themes? [closed]
- How do I cleanly override a plugin’s CSS with a child theme?
- Get info (url) from already enqueued styles
- Migrating a File from Plugin to Theme and changing its path → instead create a REST endpoint
- resize only height using wp_get_image_editor
- How do I make a wordpress plugin with menu item etc
- How to prevent users to download videos from lms website?
- WP Post Template – Templates in own folder
- How can I use get header from within my plugin?
- How to activate a plugin on the activation of a theme?
- What form should the $query media query array have for an Elementor page builder function? [closed]
- How to make a dynamic css class whose name changes every visit to confuse scraper
- Cannot add edit themes and add plugins after multisite update
- Janrain/Simple Modal under Redirected Domain
- How to prevent plugin, theme installation failures on WordPress?
- Plugin json page
- How to link file or image from wordpress plugin dir to theme by using themes function.php, is it possible?
- Can you create a custom page with content in the center already defined?
- How to code a wordpress page properly? Dashboard or unique Theme files or alternative?
- Resources for building a custom event page template
- how to make wordpress remember my choice