In fact you can, I have a folder in my theme directory called /partials/ in in that folder I have files such as latest-articles.php, latest-news.php and latest-statements.php and I load these files using get_template_part() like:
get_template_part('partials/latest', 'news');
get_template_part('partials/latest', 'articles');
get_template_part('partials/latest', 'statements');
Just dont forget to omit the .php from the file name.
Related Posts:
- Passing variables to template parts
- get_template_part for template in subdirectory not working
- How to add variables to a template
- Using require_once for parent-directory not working but is working in sub-directories
- Is it possible to override the result of get_template_part()?
- Get template part vs locate template function
- passing argument to get_template_part() or a better way to code
- Templates & CSS – Proper Programming Practice?
- TwentyTen: Overloading template.php files vs. get_template_part
- How to include template according to meta post value
- Using Includes in Templates in Document Head
- How to move style from template file to section?
- Unable to include a template
- Where is the template for the ‘standard’ format of a post in the theme twentythirteen?
- Valid HTML in Template Part
- Remove portion of header code from home page only
- Use a separate template for the home page only
- How to create new template page and template-parts in wordpress theme [closed]
- WP overwrites my setup_postdata() setup
- Including template pages within another template?
- Organize template parts and page templates in folders in regards of template hierarchy
- How to get all template files used for rendering a single post/page?
- Display a custom 404 page without a redirect
- How can I show contents of a template part inside of another page?
- When to use content-pagename.php?
- Theme parts path location dump
- Is it possible to call a template file inside wysiwyg editor? And how?
- WordPress “Blog” template hierarchy
- Adding Page Attributes Metabox and Page Templates to the Posts Edit Page?
- Is there a way to list all used/unused WP templates?
- Print WordPress template filename(s) for debugging
- How to add custom content template part for a custom post type on main query using a plugin
- Change the name of the ‘Default Template’
- Echoing Elementor page content in template, but it doesn’t get styles and some widgets are missing
- How can I modify the default reset (lost) password email text?
- Template files missing after moving site
- Grid layout “last” class to every third item
- How do you modify Page Template?
- How can I get the content of the home page?
- Why aren’t my posts showing?
- How to display error on specific template?
- What is content.php file that is needed for Jetpack infinite scroll plugin?
- Auto-Generate Longtail-SEO Pages/URLs
- bloginfo(‘template_directory’) img src
- Should template files be copied to the child theme for editing?
- Include a specific page in your template
- Link to file in plugin directory from wordpress template?
- Calling an image within the theme folder from inside a post/page?
- Best Constant to use to check if WordPress is running
- How to check if txt file exists inside template folder?
- WordPress automatically created files like .theme-name / .plugin-name.php [closed]
- style sheet header on Page Templates
- Why does the Full-width Template in Twenty Twelve pack so many classes into the body class attribute?
- How to support custom templates on a custom post type?
- How to use $wpdb (from the template) to update the DB, without being an admin
- Page attributes missing
- page-{slug}.php vs. template-{slug}.php
- Understanding the Template hierarchy
- wp_enqueue_style and different styles for blog template
- Can I have both front-page.php and index.php?
- get_header(), get_footer() from plugin template
- Problem creating a custom category page with pagination
- If Posted After Date
- how can I add a “read more” tag directly in the template?
- Update template without undoing all my edits?
- How to get and set the post tag value within WP Query from URL?
- How to display specific child page template in wordpress
- The wordpress website is showing ‘w’ while it loads and in the footer
- how to properly include or get file contents in a wordpress theme
- Is there a wordpress template like this [closed]
- Assign Specific Template for Custom Post slug
- Why won’t the action hook wp_head accept parameters?
- trouble calling different header.php for home.php
- How Add Code in Page Index Custom Template?
- Editing my loop-page.php causes posts to show on all pages
- How can i conditionally load taxonomy-{taxonomy}.php template php files through functions.php
- Commented code in WordPress template?
- Search button click sends to single-custom_post_type instead staying at the same page
- WordPress site not loading styles on desktop?
- Display all page which have not a certain template
- ACF – Attach JS file depending on ACF field
- Which template(s) to override to use a different sidebar for blog, single posts, categories, blog archive?
- how to insert gravity newsletter subscription form in template
- how to change custom post type search template to output search results in posttype-archive.php
- Locating the template behind a WordPress Page
- why get_header doesn’t work twice in a test
- show Visual form builder in the front end
- query_post while (have post) get_template_part()?
- Search results in custom template
- Is there a list of all possible WordPress URL’s?
- How can I setup custom templates for a meta-data query
- Move Index to a page
- Index template and Home page
- Taxonomy template for all taxonomies attached to certain post type
- How to display page content and a list of posts on the same page?
- Force template on page load
- Make a PHP file with a function
- Post archive is not using the assigned template
- Category theme template becomes default template for child theme
- Template adding to the page