You need to hook it to an action.
Add the below code to the theme’s functions.php file. It should work.
add_action( 'wp_enqueue_scripts', 'theme_flexslider_css' );
function theme_flexslider_css() {
wp_register_style( 'flexslider', get_template_directory_uri() . '/css/flexslider.css' );
if( is_page( 'home' ) ) {
wp_enqueue_style( 'flexslider' );
}
}
Related Posts:
- Why is style.css not being enqueued?
- How to enqueue style before style.css
- How do I register/enqueue a custom CSS file?
- WordPress Register Style Called Incorrectly
- Load custom css after bootstrap
- The correct way to include JavaScript and CSS in my WordPress Themes
- Relative path in wp_register_style not working
- How to disable all css from the theme for a specific post type page
- How to change btn color in Bootstrap
- force footer on bottom on pages with little content
- Dynamically change color to lighter or darker by percentage CSS
- How do I right align div elements?
- CSS “margin: 0 auto” not centering
- What is the difference between “screen” and “only screen” in media queries?
- JavaFX css themes
- Border Position
- Bootstrap align navbar items to the right
- Detect if a browser in a mobile device (iOS/Android phone/tablet) is used
- Using font awesome in codepen
- using media queries with LESS
- How can I apply styles to multiple classes at once?
- How to get multiple images to auto resize and stay centered within a div
- CSS rotation cross browser with jquery.animate()
- How can I center
- into a div?
- How to specify a class added to my gallery
- How to add a “last” class to the last post in loop.php?
- How do i use fontawesome icons in TinyMce editor?
- Assign title-specific class to list items in menu based on WP pages
- WordPress – https : Css and Js files are not working (load on http instead of https)
- Highlighting the current page in a navigation menu which links are generated with a custom loop?
- If I dequeue Gutenberg Stylesheet will that have any effect on WordPress 5.0.1?
- How to center a video [closed]
- Styleswitcher or themeswitcher to allow user to switch back to standard view from mobile device
- Remove WordPress/Gutenberg button styles for ACF blocks
- Relative path instead of absolute for wp_enqueue_script
- Theme Check errors about missing CSS rules
- How to override Gutenberg admin CSS
- Specific css on homepage, different one for other pages
- Font Awesome wp_enqueue_style
- Using uncss or similar with WordPress?
- How can i add note, caution, warning quote inside the text? [closed]
- Add to Cart button woocommerce background and with doesn’t display correctly
- How to enqueue a random css style?
- How to include .css code in a WordPress page template?
- How To Add a Transition style to WordPress Comment Box? [closed]
- How to use Japanese characters for a single page
- Certain aspects of site suddenly not working in Chrome and Firefox
- How do I make header.php use different css for different pages?
- How to change header dimensions in WordPress?
- How to display custom style based on theme option select box
- wordpress css file
- Implementing a simple slider in code?
- Target h1 on single post page [closed]
- Add class to navigation link of page
- node.js and webpack throws error when trying to setup node to watch theme folder for saved changes
- Keep comments but turn off commenting
- How to remove Author and Category from a single portfolio page? [closed]
- why is my paypal button not clicable [closed]
- How can I selectively insert a header for my shop page in woocommerce? [closed]
- Change the search icon in twenty fourteen
- styling isnot working in wordpress theme
- Using True Type Fonts (ttf) [closed]
- Horizontal drop down category with hover effect working
- Child Theme style.css changes aren’t showing. Parent “style-less.css” over rides it, and won’t update
- Broken css on mobile phones only on https
- WordPress CSS completely broken on IIS
- Trying to hide HENTRY (Author Meta Data) from a Post ID
- Probleme d’emplacement
- Getting and setting CSS variables with JQuery in WordPress backend fails
- Theme: Twentynineteen // How to exclude cookie-control triangle and star svg from being overwridden by theme css “svg { fill: currentColor; }”
- CSS does not Update
- Need help removing block of white space between footer widgets and footer [closed]
- How to make a sidebar form show at the top of page on mobile?
- Why child theme stylesheet takes long time to update?
- Navigation menu disappears when I hover the mouse [closed]
- Logo Keeps Changing to the Default for Transparent Settings
- I want to change change the arrangement of the grid of posts displayed by the theme on the Search page (read the description for better understanding)
- Custom Plugin CSS: Can’t update them!
- Can’t center post thumbnail with bootstrap [closed]
- Force include a stylesheet from parent theme
- Head section of the wordpress blog
- Altering the design of WooCommerce notifications [closed]
- How can I add this specific link hover effect to a WP site? [closed]
- Site name not showing in browser bar, only url
- Making a custom CSS per mobile
- Pages in another language
- Using a style sheet for modern browsers and another for older browsers
- How to insert a clickable and fixed background [duplicate]
- Use of CSS classes in editor-blocks.css file
- Problems when writing a post
- Will the following code make my css deal with images in the optimum way?
- Interactive maps in wordpress
- How to add input search field with roudned corners?
- s2member captcha how to make responsive – css or javascript
- WordPress CSS not working properly
- Add Custom CSS Class in Child Theme [closed]
- Min height of page [closed]
- WordPress site suddenly not showing some DOM elements but mobile is fine
- Editing size of h3 tag in wordpress on a one-off basis
- Content doesn’t fit on large size desktops like 2560×1440