WPIntell

Source evidence

different classes for different side bars?

Ocean Custom Sidebar · support · 2023-06-08T08:04:00+00:00

complaintsentiment
mediumseverity
0.8relevance
3replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

3 / 32 rows with source links

9.4% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

29 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
omniafausta unresolved
hi, I can’t see a different class for a different (custom) side bar… I want to do a bit of different styling on the different side bars, but I do not see an option to do this because the custom sidebar does not appear to have a different class or id… Am I overlooking something or should I find another custom sidebar plugin? This topic was modified 2 years, 11 months ago by omniafausta . Hello @omniafausta , Where do you have a custom sidebar? You can find the body tag class and use the JS below to add a custom class for the custom sidebar. Please put the CSS below in Customizing > Custom CSS/JS > Custom JS : jQuery(document).ready(function() { jQuery('body.single-post .sidebar-primary').addClass('my-custom-class'); }); In the above code, we use the jQuery(document).ready() function to ensure that the code runs after the document has finished loading. Then, we select the body element using the jQuery('body') selector and use the addClass() function to add the class my-custom-class to it. I hope it helps. Best Regards Thanks for your reply. I will look into your method, but for now I have found a workaround by adding a class to the body and then using that to style the sidebar on pages with that body class differently. Hi @omniafausta , I’m glad that you were able to resolve that. Best Regards

Comments

3 shown
Shahin 2023-06-13T07:45:00+00:00

Hello @omniafausta , Where do you have a custom sidebar? You can find the body tag class and use the JS below to add a custom class for the custom sidebar. Please put the CSS below in Customizing > Custom CSS/JS > Custom JS : jQuery(document).ready(function() { jQuery('body.single-post .sidebar-primary').addClass('my-custom-class'); }); In the above code, we use the jQuery(document).ready() function to ensure that the code runs after the document has finished loading. Then, we select the body element using the jQuery('body') selector and use the addClass() function to add the class my-custom-class to it. I hope it helps. Best Regards

omniafausta 2023-06-13T15:11:00+00:00

Thanks for your reply. I will look into your method, but for now I have found a workaround by adding a class to the body and then using that to style the sidebar on pages with that body class differently.

Shahin 2023-06-15T06:04:00+00:00

Hi @omniafausta , I’m glad that you were able to resolve that. Best Regards