If your template file doesn’t have the <?php
tag at the top, you should add it.
<?php
/*
Template Name: Exhibition - Pilgrims
*/
…is how the very top of your template file should look.
Your sample should read like this.
<?php
/*
Template Name: Exhibition - Pilgrims
*/
get_header(); ?>
<div class="container fadeIn perimeter">
... [etc]
Related Posts:
- Check if a menu is empty?
- Exclude pages with certain template from wp_list_pages
- Easiest way to show total number of subpages
- Switching between custom templates in a post type of the admin menu
- Custom Template 404 for specific custom post type
- how could I load a different template part by page
- Change title only in dynamic page
- Does wordpress templates always in files or in database?
- Adding wrapper elements in the_date() like in the_title()?
- Prevent header and footer from loading on specific pages with template or plugin
- Loop on a wordpress Page instead of content coming from the WP text editor
- To close or not to close php
- How to add a .php file to WordPress
- Displaying a WooCommerce product via PHP
- What exactly does “Posts page” do in WordPress?
- WordPress Template Engine?
- How to have a custom display for both woocommerce archive and product-category pages? [closed]
- wp_remote_get returns an error for valid URL
- Blank on static home page?
- Adjust the results quantity for Search Results page pagination
- Loading page template into shortcode
- Categories Template Assistance
- Is it possible to use the featured image of a page as a css background without inlining?
- Use template for posts with a particular category grandparent
- page template for attachement page?
- Placing the_content inside shortcode not working
- How to override wp-admin styling
- Changing the template hierarchy
- How to enqueue CSS and JS only on specific template?
- Automatically add custom CSS to new posts using a category template
- How can I load a PHP page without using a Template?
- Showing content from one page on another
- Page Automatically Generated from Theme?
- How to hide all child pages with post_query?
- Can I install/embed WordPress on a ‘single page’?
- Get and insert order email address to the PHP template inside HTML text
- code is skipping a div
- How to display pictures from database?
- Dynamic content in template
- Populate editor with some content of a page with a page template
- How to get the value of input hidden html from text editor to custom page template?
- Automatic Shortcode Creation with Custom Fields [closed]
- how to show only specific category for a template
- Using same variable names in files added with get_template_part()
- Add filter multiple times using only one master function
- Create a Blog Template Page
- Showing latest post without 301 redirect
- Show meta box only for default page template
- Display custom field on 404 page outside loop
- single.php with different look by category
- Removing WordPress Footer -without access to PHP code?
- Adding conditional text to a PHP Shortcode Template
- Create page template via functions.php?
- Short code template + ajax
- how to display this functions?
- is_page_template showing partial results
- Adding regular php file to site
- Template Loop – add switch case php
- get_page_template_slug returns incorrect path
- Post repeated when opening in overlay, how do I solve this? [closed]
- How can I get “Previous” and “Next” to show in the navigation besides the links?
- Splitting the_content() by size?
- Gravity Forms merge tags in templates?
- Unable to render custom field after attempt to generate a list of recent post in page template
- Make a page (url) not cacheable [closed]
- php loading different structure than source code
- pass html code to worpdress
- How do I add my PHP app to a WordPress page whilst keeping semantic URLs?
- Getting a WordPress tag to print inside of a traditional php echo
- Why wp_remote_get() fetches certain web pages while it doesn’t work for my localhost?
- Require()/Include() post template adding extra content
- Contain multiple page templates in one PHP custom template file in WordPress?
- Display metabox galleries on specific page template in admin editor
- Display WordPress archive template page in 3 columns and not 1 column [closed]
- Run do_shortcode on php template using JS function
- How to hardcode header and footer in WP?
- Change the “Show All” button in a WordPress Portfolio Filter
- WordPress add custom search
- How to Change Site Elements based on referring URL
- How to add a full working piece of website already coded, to a large scale Website design project?
- If is_page elseif is_page not working like I want it to
- How to display last whole post on the homepage
- missing admin bar and widget in a template
- How to include a function in a template with template tag
- My own theme’s custom widget areas are not working
- Pass form attributes to another php template in wordpress
- Add point on excerpt post
- Create a custom theme-specific page, invisible in the admin-panel?
- WooCommerce – Print Processing orders [closed]
- Loop returns more items than exist?
- How to call a certain object/menubar in a PHP file
- Use page.php for front page
- How can I put a custom field as the link of a button shortcode?
- how to register a second page-template
- why is markup routinely placed in functions in wordpress?
- If I define a variable in header.php, how do I make it available to templates?
- Custom Post Type doesn’t have template content when creating programmatically in PHP but does when created in WP Admin
- How can one use variables in a template or template part without polluting the global scope?
- Need Help With Making Full-Width Template for Blog Posts (common methods aren’t working)
- duplicating page templates