You can enqueue a different stylesheet only for index.php
using conditional tags
The following code should be added in functions.php
/**
* Proper way to enqueue scripts and styles
*/
function theme_name_scripts()
{
if ( is_home() )
{
wp_enqueue_style( 'style-name', get_template_directory_uri() . "/path_to_file/yourStylesheet.css' );
}
}
add_action( 'wp_enqueue_scripts', 'theme_name_scripts' );
Related Posts:
- What is the difference among col-lg-*, col-md-* and col-sm-* in Bootstrap?
- Set line spacing
- Outline effect to text
- create a white rgba / CSS3
- Using CSS for a fade-in effect on page load
- Transition of background-color
- In CSS what is the difference between “.” and “#” when declaring a set of styles? [duplicate]
- css: how to center box div element directly in center?
- Transitions on the CSS display property
- What is element.style and why is it overriding my css settings?
- What’s the HTML to have a horizontal space between two objects?
- HTML/CSS float: left; is not working properly
- How to get current screen width in CSS?
- margin-right is not working with my HTML. How can I center my content?
- CSS Div width percentage and padding without breaking layout
- CSS div width not working
- Positioning background image, adding padding
- CSS Box Shadow – Top and Bottom Only [duplicate]
- Set bootstrap modal body height by percentage
- Click through div to underlying elements
- Responsive iframe with max width and height
- Overflow-x not working
- Inner glow effect of button
- Hexagon shape with CSS3
- CSS selector for first element with class
- Remove top admin bar
- How make theme css be first and not plugin css
- One WordPress and database but multiple subdomains
- How can I remove css from a child theme?
- Can “ and “ tags be used in the HTML editor?
- Change color of audio player depending on user role
- CSS style button For WP Login Function in page template
- WordPress Twenty Fourteen Theme Sidebar
- How to apply wordpress css styles to a jQueryUi dialog?
- Auto LTR-RTL Text Direction in wordpress post!
- Is there any size difference between single quote ‘ ‘ and double quote ” ” in CSS
- Website scroll not working on SAFARI
- Old Site displays on Mobile View, not New Site
- WordPress problematic caching
- why this media query is not working / not loading when I put it in child theme?
- Rendering css to screen and debug problem
- How to link theme fonts directory in WordPress CSS?
- No responsive design is displayed
- WordPress custom styles in menu page
- Child theme CSS not applying to element
- Unable to align my sidebar to the contents section instead of comments
- Make CSS Changes To Only Affect Mobile Browser [closed]
- Disable File Editing function
- HTML email sent with wp_mail shows plain text
- Style file inclusion
- adding the_custom_logo(); to header
- CSS getting injected into index from somewhere after theme/custom CSS is loaded, overriding all of my CSS [closed]
- How do I change the style of just a part of the tagline?
- Having a hard time linking my css and JS files on a Boostrap to WP conversion
- Apply custom css for user role
- Reduce font size [closed]
- override a css style [closed]
- How to avoid repeating similar properties for all tds of a table in a wordpress post
- Using css class selectors on a specifc page [closed]
- Loading bbPress CSS file only on forum directory
- How can I force the WordPress visual editor to preserve the line breaks after paragraphs?
- How to create CSS Counters for Comments (depth 5)?
- Override All CSS with Custom CSS on a Page by Page Basis
- padding not working
- Hide Some Fields of Post Submit box
- CSS properties in textarea in the Customizer
- Navbar bg to overflow to section below (updated)
- New Styles Not Rendering On Mobile Phone and Tablet
- WordPress default theme CSS version problem and not loading
- Penscratch 2 – changing color of the main block
- Include ElementorPro css into WordPress custom page
- Customizing the CSS for the post/page editor?
- My Child Theme CSS Isn’t Working
- how to modify html on homepage (no home-page.php in my theme)
- Remove dashicons.min.css conditionally
- Remove Parent Style on Carousel
- how does additional css rendering work?
- How do I make a child theme’s style.css load after plugin css?
- WordPress – Portfolio – Change number of items in a row
- Floated element floats into post content in IE, Safari, and Chrome
- I cannot make this position properly in WordPress [closed]
- How can I pass a variable from PHP to LESS?
- Large Unwanted Space at the Bottom of Blog Posts [closed]
- Create a body div using CSS [closed]
- vertical menu bar css
- After upload on server 404 on all pages, no css
- How would I use a media query to make my entire theme responsive or fluid? [closed]
- Clear white line off page [closed]
- Strange symbols on page [closed]
- I need css code to divide my webpage sections into two columns
- Images at the same vertical position in multiple columns
- Put CSS on TOP, how?
- I am trying to apply these CSS rules to x3 Post-ID’s but I can’t get it to work – any idea how I can?
- In which file can I find the custom CSS code I entered?
- Some times CSS not Applying
- CSS does not take effects and it doesn’t show in inspect [closed]
- Add Quicksand for mobile devices
- can i custom rendered content from API?
- How to include Elementor CSS in custom php file [closed]
- What is unsafe about this CSS?