You have to use Conditional Tags, with those, you can check in which page you are, and load a diferent stylesheet for each option.
A little example using is_page
if(is_page('about')){
echo '<link href="https://wordpress.stackexchange.com/questions/161615/style1.css" rel="stylesheet" type="text/css" />';
} else {
echo '<link href="style.css" rel="stylesheet" type="text/css" />';
}
That should go in your header.php
file, or you could create diferent headers for diferent pages, and then use the get_header
function. There are other ways to deal with headers, but that’s a diferent topic.
Related Posts:
- How to insert spaces/tabs in text using HTML/CSS
- How to change btn color in Bootstrap
- Failed to decode downloaded font, OTS parsing error: invalid version tag + rails 4
- How to make the HTML link activated by clicking on the
- ?
- How do I right align div elements?
- How would you make two s overlap?
- CSS text-align not working
- How can I insert vertical blank space into an html document?
- What is the difference between “screen” and “only screen” in media queries?
- How to have an anim gif on a link and play it on hover and reset
- How can I make Bootstrap columns all the same height?
- Align text to the bottom of a div
- How to make a
- display in a horizontal row
- CSS3 Scale Animation Keyframes
- JavaFX css themes
- How can I apply styles to multiple classes at once?
- Responsive Canvas in Bootstrap column?
- How do you avoid caching during development?
- Are there Gutenberg container blocks?
- How to add a “last” class to the last post in loop.php?
- How do i use fontawesome icons in TinyMce editor?
- Get parent category class in post_class()
- Why won’t child theme’s style.css override plugin’s css
- some things in child theme css not overriding parent
- Is it possible to create a full width row in WordPress’s editor window? [closed]
- How do I find (index) file in order to change style on CSS?
- Enqueue style for Password Reset page
- How to center a video [closed]
- How to change header & footer to full width? [closed]
- If post by specific role different css to everyone
- removing my underline from hyperlinks
- WordPress stripping out BR tags, need assistance
- Specific css on homepage, different one for other pages
- Media library style not loading correctly when selecting a page featured image?
- Use wp_add_inline_style to add code to before wp_head?
- How to Remove White Space above video Block
- 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
- Output terms to post_class()
- Layout using Bootstrap not aligning correctly
- No styling on fresh wordpress installation
- How to include .css code in a WordPress page template?
- Enqueue Style Function Not Loading
- What’s the best way to add the LESS preprocessor to a WordPress theme?
- How to disable the hover effect in WordPress and Elementor?
- What makes WP so SEO friendly?
- what could cause get_stylesheet_directory_uri() to fail?
- Delete a white space using css
- Implementing a simple slider in code?
- CSS – Initial HTML Margin Issue On WordPress Site
- Cannot set property ‘className’ of null at setThemeFromCookie
- Target h1 on single post page [closed]
- Can not find css directory in header
- custom header navigation has odd spacing [closed]
- jQuery UI Theme that aligns perfectly with the admin UI
- Error in node.js webpack-cli failed to load config, typeError: ManifestPlugin is not a constructor
- dynamic css file for admin / backend and get_option results in Uncaught Error: Call to undefined function get_option()
- How can I force Dynamic CSS via ACF values to update on page load?
- WordPress backend is loading without style
- Append style tag in head while shortcode runs
- Add a unique body class for every admin page (including trash)
- Why would a theme writer put their CSS in one long string? [closed]
- Show product information on right side [closed]
- How to integrate Bootstrap Grid System in WordPress
- Show/Hide Div for Login Mask
- customize continue reading
- Target admin page body via CSS class
- Hide Overflow on a Specific WordPress Template
- Google Chrome CSS issues [closed]
- ACF Gut block broke wordpress default style?
- Scroll code block instead of wrapping text
- Divi CSS Flex/Margin Error
- How to enqueue stylesheets in child-theme functions.php?
- Change class value using CSS
- Dequeue CSS of the Parent Theme
- How to make video responsive in full height on mobile?
- div:before appearing in front of the block
- How to replace wordpress css or js file with external file?
- Unable to properly load WordPress Admin page
- Change style of Twenty Seventeen child theme
- Why is css not applied on paginated query?
- Disable CSS specific page
- Editing anchor style in main navigation bar
- My contact form is not being responsive
- Display current category without an active link in wp_list_categories
- Outputting the blogposts or the_content()
- WordPress with PageLines theme: how to change the background color of a page? [duplicate]
- Apply Classes to post text inside editor
- Twenty Twelve theme: remove margins
- Parent style messing up with Bootstrap [closed]
- How to add input search field with roudned corners?
- s2member captcha how to make responsive – css or javascript
- Min height of page [closed]
- How to define a special character to change the style of my inline code?
- Why is the “Additional CSS” section missing in my theme Customizer?
- Is there a way to edit the fonts of headings without a plugin (in the 2022 theme)?
- Bullet points not showing in wordpress
- IOS Ventura Safari 16.3 position fixed elements goes above scroll bar
- Elementor Contact Form Submit button has empty class