Something like this if you want to call mytemplate.php:
get_template_part( 'template');
Or something like this if you want to call content-mytemplate.php:
get_template_part( 'content', 'mytemplate' );
I hope that this will help you.
Related Posts:
- Is including the loop necessary for page.php? [duplicate]
- Loop and Page template : my WP_query don’t take args
- Create a loop that gets pages with their template
- How do I make a variable available inside partials?
- Print the whole page?
- Getting only direct child pages in WordPress with get_pages
- Do I need to use The Loop on pages?
- Using the Loop to show all levels of subpages under a parent page? Halfway there
- Child Pages Loop
- Get post by page name or slug
- Loop that displays PARENT PAGE & CHILD PAGE & outputs GRANDCHILD PAGE title and content
- Display subpages under parent page as a list within a loop
- When and Why is is_singular(‘my_cpt’) true while in_the_loop() is false?
- Identify the page being shown while in The Loop
- Trying to list out child pages with WP_Query
- loop not showing up when using a custom page template
- If Loop has odd number of posts on last page Custom style for last post in it
- Custom page template
- Getting page ID inside loop
- single page site with subpages
- How to loop through ALL pages?
- Does get_template_part pull data once in a loop?
- Get Pagination (WP-PageNavi) not to work
- Post Format single-loop.php using get_template_part
- How to get_template_part using AJAX?
- Display content of page template (get_page)
- Loop after page content
- wp alchemy multiple image uploader output images to template
- Running a loop with a custom query string on a custom page template
- How to load all pages into one page with their templates
- Problems with loop
- How to hide all child pages with post_query?
- How to show “teaser” posts on blog / archive pages, otherwise full posts
- Detect if current page is front page within custom query
- Get Page content to displayin Bootstrap Modal
- Custom Loop Using Shortcode in Custom Page Template
- Do I need to use The Loop on pages?
- Page-loop is looping content from custom loops on the same site. How to avoid that?
- How do I display an image before the first post of the loop when I’m using get_template_part?
- Multiple get_posts() queries on one page
- Exclude page name from loop
- Stepping through a foreach loop – adding +1 to the end of it so next time it loops it starts on item 2
- Include multiple page ids in loop
- Get post offset/posts page offset in single post page (outside the loop)
- how to replace get_template_part(‘loop’,’tag’) with explicit styled version?
- First archive page with a few posts
- Tags on page (not post) returns nothing – why? Improved clarified question!
- get_template_part() Not Working in Loop
- Exclude page from loop results
- Get_template_part() problem with the_content()
- Problem with Front-Page.php loading recent posts
- How can have a conditional template tag based on the main loop within a secondary loop with new WP_Query(), using get_template_part()
- excerpt not showing up
- WP_Query is only looping home page, not pages
- Interrogate a page within a loop to check template type or custom meta data (Pages vs Posts)
- How do i create a list-posts-page?
- Static Website No Titles But Still Nav
- WordPress: query pages except remove one page
- Custom Header added within Dashboard pages, is this possible with custom template files?
- How to declare a variable in a loop and make it available in the template file
- How to use custom page for all posts with custom url, call another directory?
- Duplicated tag in loop
- get the value for ALT is we check to see if an actual ALT value is set, if not we use the caption and if no caption is set we use the title
- Adding a second loop breaks everything
- Archive: Lists itself
- My WordPress installation doesn’t load correct template
- is it bad to copy the loop for a template?
- Get top Page IDs from menu and cycle through their child pages on a scroller
- Problem with Displaying Custom Theme Page’s Content
- Search – Check if post is a page on search page
- Structure and Display Content from Multiple Pages on Single Page
- Making a specific page wordpress compatable that is not index
- Default Template infinite loop of Title
- Have multiple loops on a page appear after/between page content
- Display articles related to a custom field on a page
- Stuck with conflicting loops on page template
- Same Loop on Multiple Pages
- Loop not showing up on page template
- strange parse error when including a loop template within another template
- Custom Page Template and Category Exclusion
- get_page() unlike Loop returns the post content without html tags. How can I fix this?
- Display all posts in a page code for template
- the_title() shows title of the first post instead of the page title?
- What exactly defines a Main Loop and a Secondary Loop?
- Loop code is displaying pages but not actual posts
- loop through all posts memory error
- Targeting a Certain Post in Loop (CSS)
- Display most viewed post from last 30 days is not working correctly
- Split loop to load WordPress gallery into Bootstrap modal and carousel
- Changing permalink name redirects to another template?
- WordPress Blog has an infinite redirect loop
- How to create bootstrap grid loop?
- How can I access specific posts brought back by query_posts?
- Hook to main query with filters based on custom fields
- Custom fields in post later used in loop
- Loop keeps showing the same post even when I click on a different one
- Display all the terms within a custom taxonomy
- get all page templates
- Posts Loops To Display Specific Posts Inside Page Template?
- Divide loop into several columns based on post custom field and enable infinite scrolling