Per the register_sidebars()
Codex page, the CSS ID of the sidebars gets incremented by default. In other words, if you’re not explicitly setting the id
array value — and in your code sample above, you aren’t — you would end up with sidebars with CSS IDs of sidebar
and sidebar-2
. You can then style them differently in your CSS file (be it style.css
or a custom one that you’ve added):
#sidebar {
/* Styles */
}
#sidebar-2 {
/* Styles for the 2nd sidebar */
}
Related Posts:
- Missing sidebar parameter “fix” – before_content
- Creating a blog on my companies new website using WordPress but I have sidebar issues
- How to remove sidebar primary widget on Mobile on category page [closed]
- Blog Image and Title in Right Sidebar
- Sidebar doesnt get updated?
- Incorrect MIME type for assets with Valet
- How to display pictures from database?
- How to add condition in wordpress loop? [closed]
- Child page menu in sidebar
- Theme developement – incative sidebars
- Customize position of social icons in upme plugin [closed]
- Best way to schedule daily change in CSS parameter
- Css loads very slow [closed]
- Gravity form built in Captcha
- How does wp_enqueue_scripts work?
- Different post styles depending on category
- How create a Shortcode with hover and complex options
- WordPress Multiple Navigation bars
- two columns of posts on homepage, one of them “favorites”
- Generate sidebar depending on height of post
- Auto 301 to full post permalink? (using : /archive/%post_id% to %post_name% )
- Whats the proper way to use a php stylesheet in a wordpress theme? [duplicate]
- custom css for admin only
- responsive.css in the WordPress should be prioritized
- How do I add a custom css to all posts without affecting homepage css? [closed]
- Which is the correct way to conditionally enqueue a CSS file?
- Custom Background by Page IDs
- proper way to add css using functions.php?
- WordPress style.css not updating, only after theme reload
- Adding logo to WordPress header
- Thumbnails appear to be zoomed
- Use PHP in stylesheet to specify a background image based on Category ID
- Automatically set all tags to have a height of 0 if there is no content inside the tag [closed]
- if statement with is_active_sidebar()
- height should be set to auto to avoid pixelation in the post thumbnail function
- Odd / Even posts add class minus first post
- Change CSS based on is_user_logged_in
- How to determine if the sidebar is empty? Or not active?
- RTL Stylesheet Confusion with WordPress
- Correct way to enqueue page specific CSS file
- Wrapping a Sidebar within
- Add Codepen animation as Preloader to WordPress
- WordPress wp_add_inline_style unable to give hex colors?
- Reduce size of responsive title
- How to make container class in PHP
- Sidebar not appearing in footer, but it appears everywhere else!
- How to create table in wordpress without plugin? [closed]
- WordPress archive page showing 404 Error [duplicate]
- PHP in CSS file?
- Clickable image link sends people to wrong URL
- Add class to DIV depending on page loaded
- Liking a facebook page from wordpress website?
- trouble with page_id & highlighting current page
- Last class on last headline?
- Creating a mobile site by adding a new class to the body tag from functions.php
- wordpress admin plugin menu custom css
- How to add drag and drop functionalities to a div inside option panel
- Removing WordPress Footer -without access to PHP code?
- Change “No Comments” link to “My String” on Blog Post (Find Snippet in Code or use CSS, PHP Solution) [closed]
- How to Change CSS Colors from Custom Plugin Settings Page
- Can I set up a hover animation in CSS depending on a PHP conditional?
- Get ACF options field in PHP acting as CSS
- Where can I find the inline-css of my theme header?
- CSS change in woo commerce Place Order Text [closed]
- Post repeated when opening in overlay, how do I solve this? [closed]
- Menu Custom Data Attributes
- Highlight the links without using dropdown
- Problem with adding custom CSS class to image in ACF Photo Gallery plugin [closed]
- Add New Text Box To WordPress Twenty Seventeen Header
- Split site title and apply different classes
- How to modify mobile nav menu text in theme
- Removing sidebar on category pages
- Website completely messes up when logging out
- Issue Enqueueing WordPress style.css
- Need help removing […] after excerpt
- Dividing the loop to style post differently
- jQuery accordion menu
- Twentyfifteen style author comment
- Link to page with posts of specific type
- Extend Menu Walker Output
- How to add new CSS file to new PHP file
- Applying CSS on PHP variable [closed]
- Why the dynamic_sidebar() call is putted into an ul tag?
- Conditionally load class in the comment section of the post page
- Dynamic CSS through PHP issue
- Assign Custom classes to every Excerpt
- How to make changes to style.php [closed]
- conditional: if is page, and all subpages
- wp nav menu: show submenu below li item
- Add a select-option to the default widgets
- Display Custom Field in Sidebar if Value is Present
- Stuck with sidebar registering
- Styling an “active” link outside of WordPress default menu
- I get “Cannot modify header information – headers already sent” when I change my theme
- CSS images don’t show up with bloginfo
- Don’t display a sidebar widget when on a specific page
- Adding a navigation page state to individual blog and portfolio pages
- Using theme options to change a border-radius value
- How to edit background color of only one sidebar?
- Inline CSS header style priority function.php Child (no enqueing I think)