Move the template files out of the subdirectory, and put them in the Theme’s root directory. Then, if you simply want to include the contents of those template files in other template files, simply call get_template_part( 'test-page-name.php' );
.
If you insist on keeping these files in a subdirectory, you’ll need to include them via locate_template()
.
Related Posts:
- Get the blog page URL set in Options
- Using classes instead of global functions in functions.php
- What is the difference between wp_register_sidebar_widget and register_widget?
- Change admin bar to default:off
- Create “File-less” Page Template in Functions.php
- When to use esc_url, esc_html, esc_attr, and friends?
- How to edit bbPress template files – WordPress + BuddyPress + bbPress? [closed]
- How to change post thumbnail title and alt attributes to post title?
- Why might $input (Settings API) be coming through empty?
- Override default cropping in WordPress [duplicate]
- Get password when user registers and save it sha1 into database
- How do I “unhook” / de-register jQuery so that it’s not called as part of wp_footer();?
- Removing the default sidebar from admin panel
- Merging PHP download script into `functions.php`
- Is there an error in get_the_tag_list()?
- Returning Variables back into a template
- Allow users to add custom functions to wordpress theme
- Change date number to another language/script?
- How to add custom template tag in wordpress theme?
- Nesting Functions within Functions
- Is using eval() ok in this scenario
- Can’t access WordPress functions in file called via Ajax?
- How can I customize wp_footer, where is the code that controls what this function does?
- How to list all images in uploads directory except those that are attached to any post
- More than one meta field in a single meta box?
- Is there a theme function for is_password_protected()?
- how do you create an admin interface in plugin for your theme
- How to determine which custom header image is being shown
- Toggle Sidebar Display
- How to store functions in… functions.php?
- Unhook jQuery from WooCommerce via `functions.php`? [closed]
- trying to use wp_handle_upload with ajax
- Should I use include or load_template for including shortcodes, plugins and so on?
- Check if home.php and set home.php as page_on_front
- Should I use add_filter for functions in function.php of the theme?
- after renaming my wp-content folder, how do I upgrade my wordpress version?
- Pass variable to hook. Its possible?
- Theme Customizer not loading JS for live preview
- Remove “You are using WordPress 3.2.1” from Right Now Dashboard Widget
- Replace function in a child theme
- Custom theme, contact form 7 & fast secure form doesn’t work
- Change the “Default Avatar” admin option via functions.php
- Replace single_template filter with what for default posts?
- JQuery undefined and Stylesheet loads in bottom along with js files
- How to call the_time current?
- Add content after get_header
- Can’t change theme name
- How to set default values for edit_post_link() in my theme?
- How to make excerpt image be full size instead of thumbnail?
- enqueue script if page is not equal to
- apply_filters to featured image
- Mamp pro permalink issues. Pages keep reverting to index.php
- loading custom.js file after jquery is loaded
- Creating custom function in wordpress to return data from database
- Getting URL of Resized Image
- Adding a new layout for genesis
- themeforce (happytables framework) implementation
- WordPress API Menu/Submenu Order
- What WP folder can I use to write files to?
- Can’t get staging site to display same way as live site. Completely stumped
- Display a different theme for not logged-in users
- how to test a theme upgrade
- How to add paging to query
- How to Modify a Widgets UL and/or LI Classes
- How to remove menus section from WordPress theme customizer
- What page should I use for a contact form?
- Select front page and blog page in custom theme settings page
- Version control for both Vagrant config and themes being developed [closed]
- Theme change only in CSS and a few images
- Is there an action for save_menu and/or update_menu?
- How to use Internationalized human_time_diff() function in Chinese?
- Metadata Query when storing data as array possible?
- Excluding Pages not working
- How can I add a custom button to the post editor toolbar?
- How to make the excerpt_more filter apply to the actual post excerpt?
- How to add a user defined hyperlink to the “Featured Image” and the_post_thumbnail()
- Default image size not working
- How to create and populate with few links a menu in child theme functions.php?
- Plugin does not work in custom theme
- How to Manually Code Shortcode?
- Making custom woo themes
- Where does the uploaded image go?
- Where to put custom page templates in theme?
- Let user to add input fields on theme option page
- .current_page_ancestor broken in Twenty Eleven
- MapPress Easy Google Map in Jquery Tabs Problem
- Homepage slider not using correct images
- WordPress theme header.php should I add title meta?
- Problems with cart and pages on _s theme
- Custom post type query with pagination doesn’t work
- Fatal error: Class WP_Customize_Image_Control not found
- How do I remove header/page-title image in farvis theme? [closed]
- Which theme PHP file should be edited in order to change Posts appearance
- How to hide blog by id wordpress multisite listing
- How To Display Category list from Portfolio post type plugin?
- How to override wordpress native options with theme options
- How to create multiple sidebar areas with a forloop and register_sidebars?
- Which function(s) to build a paged HTML table
- white spaces on the all sides [closed]
- What is the point of using archive.php instead of index.php?