Not a full answer, but I can at least answer this question:
Also custom post template files can not be in sub directories.
Everything, that you can load via get_template_part()
, can reside in a subfolder:
get_template_part( 'subdir/part', 'suffix' );
It’s as easy as that. Now you’ve your part inside
~/wp-content/themes/theme_folder/subdir/part-suffix.php
Slightly off topic.
Then there’re some nice tricks, like using the post format or post type as part name:
get_template_part(
'content'
,get_post_format()
);
Related Posts:
- Can wordpress theme folder name be changed freely and nothing technically happens
- Dash or underscore in theme folder name?
- Categorising themes by folders in backend
- What theme is good for posting code? [closed]
- get_template_directory has an odd functionality
- Cannot find the code for “Edit This” link in posts in a specific theme
- Custom theme folder
- My scripts-bundle.js file is getting sent to the browser as a stylesheet css file. Help!
- wp theme.. Could not create directory
- Installed theme uses get_template_directory, breaks WordPress on Windows
- How prevent someone from opening my theme directory
- Tips for managing code when developing a parent theme framework
- WordPress root directory change + Theme directory change
- Conditional config WP_HOME/WP_SITEURL does not update bloginfo(‘template_url’)?
- Get WP Install Directory
- How do I get the path to the currently in use theme’s directory?
- How do I block a subdirectory from WordPress theming?
- Categorising themes by folders in backend
- Commenting in CSS (//) equals “none”? [closed]
- Bad theme code – can you find the error?
- Using OOP in themes
- How can I allow the Editor Role to change Theme Settings?
- Undefined offset: 0 in > […] /wp-includes/capabilities.php on line 1067
- Editing Links in the Footer of WordPress Themes with Base64 Encrypted Code?
- How to set two different themes on one WordPress? (Desktop vs. Mobile)
- What are nulled themes?
- Css of both themes of my child theme isn’t showing up!
- FTP Username and password wrong while installing theme
- Copying theme from Localhost to Live does not copy all theme settings with it?
- Making the Header on the Twenty Ten Theme Less Tall?
- How to create child theme with Tesseract theme?
- How do I change the fonts in the Twenty Thirteen theme?
- Register theme customizer settings when theme activates [duplicate]
- Can I obtain differents links for different installed theme?
- hfeed CSS class in Twentyeleven Theme
- Will activating a different theme preserve custom settings to current theme?
- How to change the themes “Live Preview” url within the Appearance->Themes page?
- Question about the way that wp_register_script works
- Specific theme for non logged in users
- How do I apply my CSS to a theme page?
- How do you get thumbnails to show up in the admin edit post?
- Parallax WordPress theme without hardcoding – possible?
- Embedded Videos (PB) – Not Available
- How does a Child Theme works?
- WordPress not displaying themes in the wp-content/themes folder
- How to create child theme of already active and customized theme
- none of my css is working in my child theme
- Finding wordpress file in theme editor using the theme name
- Private theme update with zip archive without deactivating the theme
- Displaying a widget in sidebar only when no other widgets rendered?
- Published site reverts without changes to theme
- Search form not finding content in template page
- Files empty after moving with FTP
- Full page (no WP admin menus and options) admin theme options
- How to use one theme for multiple WordPress sites?
- Make multiple pages and set template/content on theme activation?
- Need to edit themes HTML code
- Any Good WordPress Themes Compatible With The BBPress Plugin? [closed]
- Template messed up on viewing posts
- Newbie wordpress question re banner height
- Adding the jQuery to my theme that already exists in WordPress?
- Interpretation and explanation of register sidebar
- Changing input type from text to multi select dropdown – skill taxonomy
- Removing the references to the wp-content folder
- Show hyperlinks only when user is loggedin
- What data does WordPress theme update pull If there is an update?
- Cannot update a file for my theme
- remove theme’s name from dashboard .. How?
- how to stop a gallery slideshow
- WordPress 2022 template, how to see the blocks added in post template on post edit?
- I cannot get an Advanced Custom Field code snippet to work – and ACF support say it should work
- Theme seems to be preventing me from adding a new page to my site
- WordPress margin issues
- 12 column grid layout
- Remove style id inline CSS in WordPress
- How to find file that placed a line in my header
- Where to find child themes?
- how to create a section inside a section with theme options customizer
- Warning: call_user_func() expects parameter 1 to be a valid callback
- Changing admin Textarea to integrated WP editor
- Line break no working on theme
- What is the template file for topic layouts in bbPress?
- Style of a theme
- Orion theme (from theme forest) [closed]
- QA/Staging envirnoment for wordpress sites
- Diagnosing a connection reset problem
- Create /archive page in WordPress Theme
- Customising a theme
- Blog shows up without Theme/CSS styles
- Boldy theme – Regarding the images above the boxes
- Symbolic Links for themes – linking one theme to many wordpress installs
- Fatal error: Call to undefined function get_header() and BuddyPress [closed]
- hardened wordpress linux install
- which theme is this? [closed]
- JQuery Error in theme for .live is not a function [closed]
- How can I either move the nav bar down or create more space for the header? Theme – Ajaira
- To create a theme or use an existing one? [closed]
- Why does WP theme not look like promoted? [closed]
- Remove image next to header image on WellExpo theme [closed]
- Adding PHP code to single template in 2023 edition of WordPress theme