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?
- How to target with css, admin elements according to user role level?
- “wp_enqueue_style();” don’t load new edited style
- Best way of adding CSS which can be manipulated by the user via theme option panels?
- functions.php not adding css to website?
- WordPress Customizer not setting default value upon initial install?
- Archive dropdown styling not applied
- Different background-image by category
- Add a Different CSS Class Into The Body Tag of Different WP Pages
- Show post in slider
- Where do posts get the sidebar from?
- How can I hide Home in my menu in a specific page?
- How Display Posts on category
- Slider loading issue
- Hide Hamburger Menu On Specific Page (Front Page/Home Page)
- Parent theme CSS overriding child CSS rules
- how to remove metadata from the posts of my blog?
- Dynamic Stylesheet loads but doesn’t finish
- How to add date to navigation bar
- Incorrect MIME type for assets with Valet
- How to add condition in wordpress loop? [closed]
- Theme developement – incative sidebars
- Css loads very slow [closed]
- How create a Shortcode with hover and complex options
- WordPress Multiple Navigation bars
- Which is the correct way to conditionally enqueue a CSS file?
- Custom Background by Page IDs
- Change CSS based on is_user_logged_in
- Add class to DIV depending on page loaded
- Liking a facebook page from wordpress website?
- trouble with page_id & highlighting current page
- wordpress admin plugin menu custom css
- How to Change CSS Colors from Custom Plugin Settings Page
- Where can I find the inline-css of my theme header?
- Removing sidebar on category pages
- Website completely messes up when logging out
- Issue Enqueueing WordPress style.css
- 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?
- Display Custom Field in Sidebar if Value is Present
- how to changes mobile menu toggle breakpoint in WordPress
- Timber right sidebar in WordPress theme
- How to find which .mo file is responsible for displaying a particular localized string?
- How to Remove Theme Style CSS inside Custom Plugin?
- Retrieve the whole widget sidebar and pass it inside an html
- Add other class content with reference class value
- oceanwp+woo mobile cart sidebar text
- Adding Custom css file in the wp-uploads directory with custom php functions
- How do I integrate vanilla Javascript to a wordpress website?
- Can’t display anything through homepage text editor
- Cannot dequeue Elementor Font Awesome css
- How to find and delete a menu item in php?
- Force Sidebar on Full Width page
- WordPress Slider is not working
- How to display post meta bellow every posts
- Add my footer menu to the header
- Add Shortcode to ::before class
- Make a full-width wordpress page
- Display child-page links in sidebar on both Parent Pages AND Child Pages
- Bring Font Awesome icons inside menu A tags
- Trying to add get_the_title hook to this line
- How to display post_content from database in different on template page?
- Displaying POST content with HTML tags and all
- remove blank space where sidebar was
- Display specific main Sub Nav on Woocommerce product pages
- Position a repeated article blocks
- Clone the “proceed to cart” button and place it above checkout on the cart page, but only appear display size is 320px
- Highlight Single Page Ancestor
- How can the searchform.php know if it’s used on a registered sidebar id ‘sidebar-1’ or ‘sidebar-2’?
- Custom Thumbnails [closed]
- Relative post date in recent posts list
- how to run a php code in widget?
- Why isn’t my link attribute getting my css?
- if conditional in sidebar plugin Password content shortcode
- How to save the output of php variables used in inline css code to the main style.css?
- wp add inline style in loop
- Display pages from specific page template
- Trying to customize wordpress drop down categories
- how to remove sidebar from particular one page
- Listing current pages subp page in list items in the sidebar
- How do I use CSS or PHP to customize WordPress Form Manager Plugin Table?
- How to NOT override inline css rules
- Add CSS class to PHP Statement
- Load files content [closed]
- Integrating CSS Into a WP Function Call [closed]
- Load slideshow.css file only if Slideshow is checked / on
- Predefine Magazine Style Layouts
- It’s not showing full content for posts pages in wordpress “[…]” while customing some changes in the style.css file [closed]
- Add a “Next Post” & “Previous Post” styled button manually to a post
- Sorting Problem
- hello can you advise how to fix the error?
- inner-wrap div pushing custom table far down on page
- Styling best practices for single pages/templates
- Sidebars panel in customizer
- How to create different templates for woocommerce single-product.php?