Instead of:
is_page('contact-template.php')
Try:
is_page('contact')
is_page
expects a post ID or slug.
If instead you want to enqueue this CSS for any page using this template, put the enqueueing PHP into the template itself.
Related Posts:
- Using wp_add_inline_style without a stylesheet
- How important is it to enqueue a theme’s stylesheet?
- Enqueue a stylesheet for login page and make it appear in head element
- 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
- Why I can’t add a CSS style in this WordPress theme?
- Is it possible to manipulate the list of page templates?
- The difference between calling wp_enqueue_scripts to load scripts and styles in custom theme
- Adding items to page template dropdown on Page Edit Screen
- Adding customizer styles with wp_add_inline_style
- What can I hook into after_setup_theme?
- Adding Content Areas to Custom Page Template
- Identifying the priority of style.css so I can make a small CSS file load last
- Trouble with conditional tags
- Adding inline styles from a widget
- The best way to add stylesheets to WordPress
- Pagination & get_pages?
- Returning Variables back into a template
- Advantages of using instead of wp_enqueue_style()?
- Page attribute template dropdown not displayed even the syntax is correct
- How to add dynamic inline style?
- Enqueued Stylesheets Effecting Admin Styles
- De-registering parent style sheet css recommended?
- Do I really need the div class entry?
- enqueue_style is not working
- Dequeue a style file which is making website load slow!
- Where can I access my custom page template?
- Is my approach to enqueue styles inefficient?
- WordPress page templates in a directory
- Child theme style.css versioning
- Disable front-page.php template
- Disable wp_enqueue_style for theme on wp-admin
- functions.php not hooking up with style.css
- Implement content-nosidebar.php / content-leftsidebar.php
- get_page_template returning nothing
- How can I let templates choose which stylesheets are enqueued?
- Stylesheet not linking
- 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?
- Theme Loading Into Dashboard
- How to add “Template” option in page attributes panel?
- How to check if a WordPress core block is active in sidebar
- How to create a custom page(not a template) in a theme
- How remove render blocking css from wordpress when you build a theme?
- Template selection area is not visible on page editor sidebar in wordpress twentty sixteen default 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?
- filemtime(): stat failed warning within a child theme
- Load sidebar template just once to prevent multiple animations
- How do I use a color from theme options?
- 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
- How to remove ID’s from wp_enqueue_style?
- Ideal inline dynamic CSS injection
- Issue On Displaying Pages with Post Name Permalink
- Why in the static pages of my theme are showing these information?
- How to include a file only on dashboard widgets page?
- Having issue with WordPress wp_enqueue_style
- theme style is applied on the dhasboard rather than the website
- Are there any caveats to compiling all of my theme’s SCSS into the style.css file in the theme root?
- 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
- Adding google fonts to WordPress theme
- A Reviews Page is Showing root Index.php instead of Template-Page
- No templates for condition page.php Elementor
- Displaying front side empty with one file attached problem
- Find out the reason that the Styles and scripts in the theme are loading properly in localhost but Not in server after deploying
- 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)
- Using wp_add_inline_style Inside a Template File
- Group several custom global page templates in sub-folder
- Problem with Displaying Custom Theme Page’s Content
- 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
- How to output wp_enqueue_style() in HTML head instead of footer
- Loop inside page template not working
- Enqueue script/style with multiple GET parameters
- How can i display a 4 diferent themplate for the archive page
- 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?