Community Forums › Forums › Archived Forums › Design Tips and Tricks › Need help on Eleven40 Theme conflict with Plugin – Widget CSS Classes
- This topic has 2 replies, 2 voices, and was last updated 12 years ago by
Hugh.
-
AuthorPosts
-
March 7, 2013 at 11:12 am #24801
Hugh
MemberI'm hoping I can get some help understanding how to fix a conflict I seem to be having with the Eleven40 theme and a new plugin I've installed named Widget CSS Classes v1.2
I'm not a programmer so please bear with me if what I'm doing wrong seems lame.
The plugin developer's site is http://cleverness.org/plugins/widget-css-classes-plugin/
The installation instructions require the following code to be added to the theme's function file.
register_sidebar( array(
'name' => 'Sidebar',
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '
',
'after_title' => '
'
) );The instructions explain the reason for this code is:
You must make sure you have an HTML element defined for before_widget and after_widget in your register_sidebar functions. This HTML element must have class and id attributes. This plugin will not work if before_widget and after_widget are blank.After installing this code the widget does work as it is designed to work which is great, except it breaks the functionality of the theme's Primary Sidebar.
What happens wrong is:
After installing the plugin code all widgets previously loaded in the Primary Sidebar no longer display, and when you look at the site the Primary Sidebar widgets do not display. The only thing that displays is the default text message that explains what the Primary Sidebar is. I assume this is because the Primary Sidebar widget is now empty.
But when I reload the missing widgets into the Primary Sidebar they still do not display. If I delete the plugin code the Primary Sidebar functionality is restored.
I checked and the Eleven40 Theme Function file does not register the primary sidebar, so I assume that' being done in Genesis. Using Genesis Simple Hooks I did try Unhooking the "genesis_sidebar Hook" and installing the plugin code again. But after doing this I still have the same problem.
I'm not a programmer and obviously I"m lost in how to resolve this problem.
I'll be very grateful if anyone can review this issue and give instructions on how to fix it.
Thanks,
March 8, 2013 at 7:59 pm #25121Brad Dalton
ParticipantYou don't need to add that code to functions.php
Is this the plugin? http://wordpress.org/extend/plugins/widget-css-classes/
Add a custom class and i.d for the widget you want to style.
You can also style widgets using the widget class and i.d WordPress generates.
What exactly do you want to do and with which widget? Link to it please.
March 9, 2013 at 9:42 am #25184Hugh
MemberThanks greatly for the reply. Yes the link shown in your reply is the correct Widget CSS Classes plugin.
The plugin is designed with a Settings Form where you define the names for as many custom classes as you want, and then these newly defined custom classes become available for selection in each of the widgets the site has chosen to display.
The way you select whatever newly defined custom class you want is by using a drop down box now available inside of each widget. It was my thinking this functionality would make the process of styling each widget easier, faster and more flexible.
But I'm just now learning CSS and PHP, and both are still somewhat confusing to me.
I do have the plugin installed and I can successfully use the Settings page to define the custom classes and I can go to to each widget and select the custom class I want. But when I do this these classes do not work unless I add the PHP code to the Theme Functions file as outlined in my post above. And as previously explained this causes the Primary widget area to no longer function, which obviously is not acceptable.
Do you think there is a way to fix this conflict, or do you feel this plugin is more trouble than its worth?
I guess one of the main issues I'm confused about is this:
1. Without this plugin, if I use Edit CSS to define several new custom classes, then how do I assign a desired newly defined custom class on a case by case basis to the each widget?
2. Saying this another way, if I have four different types of widgets loaded into the Primary Widget Area, then how do I best assign a different custom class to each of these four different types of widgets?
Thanks again for your time looking into this issue and for your reply. And apologies if I'm not explaining clearly, or because of my lack of expertise you find I'm using incorrect logic or terminology.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.