In general, “bad practice” is so common in the wordpress ecosystem, you will have to do something really bad for anyone to actually signal you out for doing it 😉
If you are the developer and maintainer of the theme, you should develop it in a way which will be easy for you to maintain in the long run, regardless of what other people’s preferences are.
If someone else is going to maintain it, keep as much as you can to the structures used by the core themes. That said, in this specific case, even if they don’t do it this way, it looks easy enough to understand by anyone that had ever worked with wordpress themes.
Related Posts:
- Loading partial templates with AJAX/PJAX
- Templates & CSS – Proper Programming Practice?
- Post formats template
- index.php template is used instead of blog page
- Load template file without a post type
- How to apply a custom template for posts by default?
- Unable to include a template
- What should I put on my index.php?
- When a link doesn’t exist, how to tell WordPress what to do? (404 Error Page)
- Is there a way to set different post templates for parent posts and child posts in the same post type?
- Having trouble with Template hierarchy. I Need to create a set of pages that drill down from states to specific locations
- Custom templates vs page-slug
- Understanding the Template hierarchy
- How does WordPress choose archive type template?
- Will renaming a `content.php` file cause any problems?
- Use one template only for custom post type archives?
- get_month_link uses what wordpress template?
- Differentiation between index.php and page.php
- Single-page.php template file name not shown
- Templates for hierarchical custom post type
- How to display custom post type?
- Assigning custom page templates to a static blog page
- Archive-custome_post.php template not working
- Organize template parts and page templates in folders in regards of template hierarchy
- Help Understanding Template Hierarchy
- User role templates
- Assign template to custom page type?
- BuddyPress : how can I call the template WordPress would have chosen (template hierarchy)?
- How can I make custom page templates work on child theme?
- Which template(s) to override to use a different sidebar for blog, single posts, categories, blog archive?
- Single Post Templates Doubt
- Category template not displaying all post formats
- Page Templates Used in Custom Post Type
- Show a custom template, no matter the page being viewed, if the user is not logged in
- Unload templates; disable parent Template Parts using only “theme.json”
- 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
- 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?
- Grid layout “last” class to every third item
- How do you modify Page Template?
- Using “setup_postdata” with “get_template_part” does not work
- WordPress Template Hierarchy
- 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?
- Calling an image within the theme folder from inside a post/page?
- Best Constant to use to check if WordPress is running
- WordPress automatically created files like .theme-name / .plugin-name.php [closed]
- 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
- Single page site with history.js
- Page attributes missing
- Remove Items from Template Homepage
- Override Taxonomy Template
- Different templates for same content, landing page from different URLs (generic, simple)
- Is it possible to register a new template file?
- Custom Empty Results page for my Custom Post Type
- Use meta boxes inside an archive page template for Woocommerce
- Create a blank test.php
- Add stylesheet per layout
- When a user registers, create a page from an existing template with their username as the page name
- Theme settings Page: Settings Api vs Update_Options
- two active templates for one post
- Where is the code for “Front Page Template”?
- Using index.php as page template
- Overwriting TwentyTwelve template file with child theme template, but lower in the hierarchy
- what is template-name.php
- templates with page teasers Or Featured Items
- If Child or Grandchild of Page
- Page template not registering on theme
- Is it possible to set archive.php instead of index.php to display blog?
- How do I custom a page that doesn’t exist in the page list?
- small problem in the article ()
- Unable to access wordpress page
- How to configure my blog page
- More than one search results page template for two searches on site
- Why default template does not show?
- Why does the blog page not take the page template selected?
- Custom Taxonomy Theme file not routing correctly
- Why would adding a template file to a child theme cause an error in template-loader.php?
- How can I make is_page_template() workable in child theme?
- How can I add some blocks to template without changing template file?
- Creating a popup
- WordPress not picking up custom templates in sub directory
- Is it possible to call a template file inside wysiwyg editor? And how?
- Retrieving post ID from current page
- Styling own template
- WordPress sites translate dynamically generated Homepages
- Why is this page using the homepage template and not the one it should?
- Single template will not show sidebar/bottom-nav and footer
- Template files not working for archives and categories
- Make default template two columns?
- Read more button not working
- templates page not showing on gutenberg editor
- How to load php templates from html page (block theme)