Twenty Sixteen does not contain any post type templates by default, thus no template selection is shown.
Adding a custom foo.php
file to the wp-content/themes/twentysixteen
folder with the following content works just fine and reveals the template selection meta box (title: “Page Attributes”):
<?php
/**
* Template Name: Foo Bar
* Template Post Type: post, page
*/
// Do some stuff…
It also works for pages only using Template Name
without Template Post Type
:
<?php
/**
* Template Name: Foo Bar
*/
// Do some stuff…
Related Posts:
- How to move page template files like page-{slug}.php to a sub-directory?
- How to move page templates to custom folder?
- Create “File-less” Page Template in Functions.php
- Is it possible to manipulate the list of page templates?
- Adding items to page template dropdown on Page Edit Screen
- Adding Content Areas to Custom Page Template
- Trouble with conditional tags
- Pagination & get_pages?
- Returning Variables back into a template
- Page attribute template dropdown not displayed even the syntax is correct
- Do I really need the div class entry?
- Page template across themes
- Where can I access my custom page template?
- WordPress page templates in a directory
- Disable front-page.php template
- Can I show all the template files that are being used on my site?
- Implement content-nosidebar.php / content-leftsidebar.php
- get_page_template returning nothing
- Multiple Page Templates & CSS
- Highest number of WordPress Custom Page Templates?
- Single Page theme [closed]
- Custom metabox for custom page template
- Why is the Page Template dropdown menu using the wrong file name?
- How to add “Template” option in page attributes panel?
- How to create a custom page(not a template) in a theme
- Move default page templates to sub directory
- Custom page template with custom fields
- how to setup custom content structures
- How can I conditionally show different home page templates based on whether or not the user is logged in?
- Load sidebar template just once to prevent multiple animations
- Need help with adding templates (archives and sitemap) to WordPress child theme
- How to create first post, fifth post full width, rest in three columns and so on
- Issue On Displaying Pages with Post Name Permalink
- Why in the static pages of my theme are showing these information?
- Modify available templates (in dropdown)
- What is the best way to build home pages with a lot of sections for distributable themes [closed]
- Templates dropdown not appearing using _s theme (underscores)
- Where to put custom page templates in theme?
- How to add pages in wordpress using codes?
- Injecting pre-defined text from custom page template to editor
- Custom theme template files
- Is it possible to have a Theme with built-in physical page files?
- How to use shortcode inside of shortcode in theme
- Trouble in creating a custom template on twentyeleven theme
- Custom search template is showing 404 when adding query string
- ACF get_sub_field ALT TAG in the repeater doesn’t show
- A Reviews Page is Showing root Index.php instead of Template-Page
- No templates for condition page.php Elementor
- Show Yoast SEO meta tags in Custom WordPress Templates (Theme)
- How to show metabox on page if it is using a template
- Template for front page (latest posts)
- Group several custom global page templates in sub-folder
- Problem with Displaying Custom Theme Page’s Content
- How to show children pages as array
- Different stylesheet for different pages not working fully
- Create a variable with string, array or multiple values
- Why WordPress gets old templates code instead of the last updated ones
- Can you create a custom page with content in the center already defined?
- Paginated WP_Query doesn’t return 404’s, even when posts don’t exist
- Loop inside page template not working
- How can i display a 4 diferent themplate for the archive page
- How to split the site’s layout without damaging this layout? [closed]
- DIV containing iframe disappears below break point of 992 in Oxygen Builder
- Is there a way to have WordPress autodetect page templates in the page-templates directory and any sub-folders?
- What is the point of using the front-page.php template? [closed]
- How to automatically set a Template Page Name next to a page in menu screen such as WooCommerce pages, front page, or posts page in wordpress?
- How to remove search bar from a wordpress theme? [closed]
- How to: Update live sites theme from version control repo via plugin or library? [closed]
- How to add a text widget during theme activation
- WordPress Theme customisation CSS
- Why does this loop only work on the homepage?
- Can I customize any WordPress parent block-based theme template files by child theme like a parent classic theme?
- How to determine if post has widget content?
- Custom Script Section Only Echoes Text
- Set multiple templates per post
- Displaying recent post excerpts on static front page
- WordPress Media Uploader in page template (On Front-end)
- How to control on which pages the Aldehyde theme’s main slider is shown?
- WordPress stylesheet isn’t being added
- How to detect and display a page only for IE?
- Change image size depending on page
- What and where are the WordPress core-bundled scripts?
- How do I get from search_theme_directories() to the $stylesheet (name) for switch_theme()
- Tabbed theme options query about add_settings_section callback function
- How to know if I am on 1st page
- I don’t know why categories are showing below post
- WordPress Custom font not found
- How do I control the header space in non-front pages in Twenty Seventeen?
- Customizer API way function is_customize_preview() works only in main page?
- Advantages/Disadvantages Using Theme Editor Instead of Pages
- Magnific Popup – Add Caption to Images
- paragraph format in WYSIWYG on a custom theme?
- unable to display the image meta value as background
- editor style css and page template with and without sidebar
- 3 x 3 grid of posts on the home page
- The normal loop with different styles doesn’t work in search.php
- Pass custom css class to add_menu_page
- How to force unlink on attached/inserted images?
- How to create sub-menu in “Allure Real Estate Theme for Placester”?
- WordPress Two Level Filters on Getting Custom Taxonomy Terms