It seems the problem was it wasn’t recognizing it was a page in the first place and thus couldn’t recognize if there was a template applied to it.
Changed
if (is_page_template('page-templates/page-nosidebar.php')) {
to
if (is_page() && !is_page_template('page-templates/page-nosidebar.php')) {
Related Posts:
- different style sheet for just one page template
- How to load scripts/styles specific for a page
- TinyMCE custom stylesheets for different post types
- Child Theme Not Overriding Parent Theme
- Enqueue styles after a plugin
- Register and enqueue style.css custom theme
- Enqueue Style Only On Certain Pages Not Working
- Split Media Queries in different files!
- Some questions about how proper add 2 CSS file in a WordPress theme?
- Parent theme styles overriding child theme CSS [closed]
- I can’t add CSS with functions.php
- Theme JS is available but theme CSS isn’t
- Proper Way to Load stylesheet on Condition
- get_template_directory_uri() links to child theme not parent
- Advanced method to control cache of enqueued style/script
- How to reference different css (bootstrap) stylesheets for the header and body of a page?
- CSS style and app.js not loading
- Stylesheet does not load despite functions.php
- How do I dequeue a Stylesheet, stored in an ‘Assets’ folder?
- Child Theme not loading multiple stylesheets
- Should I use `get_stylesheet_uri()` or `get_template_directory_uri()` when calling my CSS Stylesheet?
- wp_head not injecting css
- Define custom Page Template without its own .php file
- functions.php inject inline css
- Is it possible to enqueue a raw CSS string directly from within a template file?
- Filter the query ONLY for the search results page
- How do I create a new WP admin color scheme?
- Logout/login redirect CSS issue
- Add attribute to link tag that’s generated through wp_register_style?
- is_front_page not working in functions.php
- Custom page template how to check is_page from functions.php?
- Dequeue Scripts and Style for Mobile not working?
- How to add CSS style sheet dynamically in wordpress
- Simple/basic use of get_current_screen
- I created a child theme and it doesn’t work for some of the css files
- Is it possible to be more page/post specific with admin_enqueue_script?
- CSS stylesheet not loading
- Enqueue script o style only if a template part is loaded
- How to override enqueued styles using a child theme
- Programmatically set page template based on page ID
- Adjust which tempalte a page uses with a function?
- How to add background image control to page admin controls?
- How to specify which Gutenberg blocks are available in the editor for a page template
- Dequeue theme stylesheets but keep widget styling on custom page template
- Filtering posts by category name based on page’s slug
- Add class or ID to any WordPress function
- Multiple CSS body classes to specific page I.D.’s – is this possible?
- Enqueue scripts not working with if is page conditional tag in functions.php
- is_account_page() change to page slug
- How to enable template page only for a post id page
- Why does the ‘wp_nav_menu’ function work only until a menu is created?
- Only let plugin add actions to wp_head & wp_footer on single posts
- WordPress Menuing Question :focus
- change the url paths in the stylesheet dynamically
- Remove stylesheets from Campaign Monitor plugin
- Please Explain the Importing Process of Multiple Stylesheets for Child Themes
- enqueue styles for only mobile wp
- Pass parameter to hooked function using custom page template
- Custom styles.css sheet for visual editor
- Is my code correct to enqueue CSS on a specific page?
- Not all CSS elements transferring via parent to child?
- problem loading stylesheets to wp_head dynamically
- How to insert class in each list of categories?
- This code works, but the way I integrated it is breaking the media uploader. How can I integrate it properly?
- Default Nav Highlight
- How to pass variables from one function to another or combine functions
- remove/hide wp-editor
- define css class in functions.php
- Completely Disable WordPress RSS Feeds
- Load CSS before Theme CSS
- Can’t load assets
- How to Override Page Template if URL matches query?
- Probleme shortcode with list author
- How Can I Create a Friendly Slug for a Dynamic Page?
- wp enqueue style on about us page
- Can we have conditional CSS styling?
- Post content overflows on my mobile phone
- function class doesnt work
- Help using ShortCodes to style whole chunks of the post
- how to remove a tag in the_category function
- How to add styles in existing function?
- Adding a class to the body of an inactive site using multisite
- Conditionally apply css for a specific template part
- Pagination won’t work on custom page
- I need to ‘wp_dequeue_script’ and ‘styles’ and ADD a bunch of other css and js
- Correct way of Enqueue self hosted fonts in sass project
- Edit meta fields from within template
- How to automatically add custom classes to headings in content area
- is_page_template wont allow me to enqueue scripts
- Changing the color of post title [closed]
- Random text changing to weird icons in both admin & front end
- Functions.php in child theme that loads CSS file breaks website
- Print all inline styles to head
- functions.php / replacing div’s with new ones?
- Image width issue in IE [closed]
- How do I make my child theme’s CSS update when I save it?
- Why don’t ‘wp_nav_menu’ CSS classes work until a menu is created?
- How to fix enqueue_styles error for a twenty-seventeen childtheme
- Logout redirect via page template without confirmation?
- Template Redirect Function Only Working When Logged In