Fixing sidebar issue in Icy
-
As of WP 4.7 or so, Icy started giving array errors for the sidebars. Here’s how I fixed it:
Edit the icy/sidebar.php file in Themes, and comment out the following line, using two slashes //:
// if ( wwl_is_active_sidebar(‘primary’) )
(There’s no ‘endif’ line to worry about.)This eliminates the need for the functions that are referred to in the error messages, no need to edit those files.
Then, edit your child theme’s style.css file, if you have a child theme, or customize using Appearance/Customize in the Admin menu. Go to Custom CSS and add something like the following, depending on how wide you want your sidebar (the #content lines make room for the sidebar):
#content {
margin-right: 32%;
width: 68%;
}
#sidebar-primary, #sidebar-secondary {
position: relative;
float: right;
margin-left: -100%;
max-width: 300px;
width: 32%;
}Then, to make responsive, add the following in your media breakpoints section (or create one if you don’t have it, as shown):
@media all and (max-width: 768px) {
#content {
margin-right: 0;
max-width: 768px;
width: 100%;
}
#sidebar-primary, #sidebar-secondary {
float: left;
margin-left: 0;
max-width: 768px;
width: 100%;
}
}The above will make the sidebar go below the content for tablets and smaller devices.
- The topic ‘Fixing sidebar issue in Icy’ is closed to new replies.