Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   [SOLVED] Widget CSS Classes Plugin (http://forum.bytesforall.com/showthread.php?t=19554)

swimflyfast2 Feb 4, 2013 08:05 AM

[SOLVED] Widget CSS Classes Plugin
 
Has anyone used the plug-in "Widget CSS Classes"?
Have you had any success? It seems like an answer to one of my dreams...:confused:

I want to create borders around some of my custom widgets and manage them.


So I created a class "box_it" in the plug-in setup area and used it in one of my widgets (text)

I put
HTML Code:

.box_it {border: 2px #707070 solid;}
In the custom css area and expected that the above instance of my widget would have a grey border of 2 px but it doe not.:(

juggledad Feb 4, 2013 09:11 AM

try adding an important so you have
HTML Code:

.box_it {border: 2px #707070 solid !important;}
and put it at the end of the the CSS inserts so it overrides anything else for that element.

swimflyfast2 Feb 4, 2013 12:36 PM

OK, it works on standard widget areas but not on ones that I make. thanks. Do I need to put the code someplace else for the customized widget areas?

swimflyfast2 Feb 4, 2013 12:41 PM

3.7.10 wp 3.5.1

lmilesw Feb 4, 2013 01:04 PM

I just tried it on a text widget and it worked fine for me as long as I added !important to the CSS.

swimflyfast2 Feb 4, 2013 01:06 PM

hmmm a custom widget area inserted in header or footer area? side bars work for me but not the custom ones.

swimflyfast2 Feb 4, 2013 01:38 PM

three sets off widgets in header area:

HTML Code:

<?php bfa_widget_area('name=above-header&cells=4&width_1=119&align_1=9&align_2=9&width_2=370&width_4=500&align_4=2&before_widget=<div id="%1$s" class="header-widget %2$s">&after_widget=</div>'); ?> %bar1 %pages %bar2
%image %bar2 <?php bfa_widget_area('name=under-header&cells=3&width_1=5&align_1=9&align_2=9&width_2=640&align_3=9&width_3=34
0&before_widget=<div id="%1$s" class="header-widget %2$s">&after_widget=</div>'); ?>

%bar2 <?php bfa_widget_area('name=mission &cells=4 &align=2 &width_1=200 &width_2=200 &width_3=200 &width_4=200&before_widget=<div id="%1$s" class="header-widget %2$s">&after_widget=</div>'); ?>

footer widget:
HTML Code:

<?php bfa_widget_area('name=top-footer &cells=4 &align=2 &width_1=200 &width_2=200 &width_3=200 &width_4=200&before_widget=<div id="%1$s" class="header-widget %2$s">&after_widget=</div>'); ?> <br/ >

lmilesw Feb 4, 2013 02:19 PM

Is it a typo or are there spaces in your widget code as shown here
PHP Code:

<?php bfa_widget_area('[color="DarkRed"]name=mission &cells=4 &align=2 &width_1=200 &width_2=200[/color] &width_3=200 &width_4=200&before_widget=<div id="%1$s" class="header-widget %2$s">&after_widget=</div>'); ?>


swimflyfast2 Feb 4, 2013 05:58 PM

HTML Code:

<?php bfa_widget_area('name=above-header&cells=4&width_1=119&align=9&width_2=370&width_4=500&align_4=2&before_widget=<div id="%1$s" class="header-widget %2$s">&after_widget=</div>'); ?> %bar1 %pages %bar2 %image %bar2
<?php bfa_widget_area('name=under-header&cells=3&align=9&width_1=10&width_2=500&width_3=300&before_widget=<div id="%1$s" class="header-widget%2$s">&after_widget=</div>'); ?>


I had one in the footer that I took out for control and I had a third one in the header area that I removed as well. would it happen to have anything to do with the fact that I have more then one in header? :(

lmilesw Feb 4, 2013 06:33 PM

I don't think the multiple areas would cause a problem. Do your widgets that aren't working look like this screenshot?

juggledad Feb 4, 2013 06:44 PM

what is the URL?

(just got back from visiting my new 4 hour old grandson (#3)

swimflyfast2 Feb 5, 2013 06:39 AM

Quote:

Originally Posted by lmilesw (Post 96076)
I don't think the multiple areas would cause a problem. Do your widgets that aren't working look like this screenshot?

Yes they do, I have widget logic active as well. standard widgets work. It must have something to do with the way I set up my widget areas as I tested two of my other sites that act the same way

lmilesw Feb 5, 2013 06:50 AM

It's at a point where I would need to look at the back end to get any new ideas. If you PM me a login I will take a look.

juggledad Feb 5, 2013 07:37 AM

which of your widget areas are the one you have customed?

swimflyfast2 Feb 5, 2013 07:47 AM

The upper section "helping Haiti and Soccer" is in a widget. No effect from plug in

Text Here Same

See EVENTS it is red because I selected text_red assigned in CSS inserts as .text_red {color:red !important;}

This isn't working on any of my sites for widgets areas I have added.

juggledad Feb 5, 2013 08:44 AM

Why don't you add that class to the new widget area code? You say you have
HTML Code:

<?php bfa_widget_area('name=above-header&cells=4&width_1=119&align=9&width_2=370&width_4=500&align_4=2&before_widget=<div id="%1$s" class="header-widget %2$s">&after_widget=</div>'); ?> %bar1 %pages %bar2 %image %bar2
so why not add the class in so you have
HTML Code:

<?php bfa_widget_area('name=above-header&cells=4&width_1=119&align=9&width_2=370&width_4=500&align_4=2&before_widget=<div id="%1$s" class="box_it header-widget %2$s">&after_widget=</div>'); ?> %bar1 %pages %bar2 %image %bar2

lmilesw Feb 5, 2013 09:02 AM

Juggledad and I were discussing this and he mentioned that Magic Quotes being set to on could be the issue.

swimflyfast2 Feb 5, 2013 09:27 AM

Quote:

Originally Posted by juggledad (Post 96097)
Why don't you add that class to the new widget area code? You say you have
HTML Code:

<?php bfa_widget_area('name=above-header&cells=4&width_1=119&align=9&width_2=370&width_4=500&align_4=2&before_widget=<div id="%1$s" class="header-widget %2$s">&after_widget=</div>'); ?> %bar1 %pages %bar2 %image %bar2
so why not add the class in so you have
HTML Code:

<?php bfa_widget_area('name=above-header&cells=4&width_1=119&align=9&width_2=370&width_4=500&align_4=2&before_widget=<div id="%1$s" class="box_it header-widget %2$s">&after_widget=</div>'); ?> %bar1 %pages %bar2 %image %bar2

Because I want to use the widget areas differently on other pages using widget logic,



Here is what is in there now (with returns to make it easier to read.

Just for Yucks I took out the entire class declaration of class="box_it header-widget %2$s" and it had no effect on site.

Code:

<?php bfa_widget_area('name=above-header&cells=4
&width_1=119
&align_1=9
&align_2=9
&width_2=370
&width_4=500
&align_4=2
&before_widget=<div id="%1$s" class="box_it header-widget %2$s">&after_widget=</div>'); ?>

<?php bfa_widget_area('name=under-header&cells=3
&width_1=5
&align_1=9
&align_2=9
&width_2=640
&align_3=9
&width_3=340
&before_widget=<div id="%1$s" class="box_it header-widget %2$s">&after_widget=</div>'); ?>

Because this is happing on three of my sites that are all set up differently I suspect that there is some trouble in my widget declarations. I'd like to see an example of a entire declaration that works with this Plug-In.

swimflyfast2 Feb 5, 2013 09:39 AM

Quote:

Originally Posted by lmilesw (Post 96098)
Juggledad and I were discussing this and he mentioned that Magic Quotes being set to on could be the issue.

so do I add
Code:

php_flag magic_quotes_gpc off
to my .htaccess file? or is there an easier way?

juggledad Feb 5, 2013 10:18 AM

dealing with php settings is different at each host. You need to contact your host to find out the best/approved way to do it.

swimflyfast2 Feb 5, 2013 11:21 AM

QUEST: Create custom widget areas within my site and address CSS on each individual use of the area within site separately.

Solution
1) Use "Widget CSS Classes" plug-in to address CSS for each widget
2) Use "Widget Logic" plug-in to give control of which page each individual widget will appear.
Important Note: for BlueHost hosted accounts (check with your host provider)
Edit pht.ini file in public_html directory | set "magic_quotes_gpc to "off".|
:p:pThanks to lmilesw and juggledad! :p:p

I will post a site soon that shows the wonderful things you can do with this.

I'd love to hear what magic_quotes_gpc does.

lmilesw Feb 5, 2013 02:33 PM

On BlueHost (and HostMonster) you can set your PHP version to 5.3. Magic Quotes has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.


All times are GMT -6. The time now is 11:53 PM.

Powered by vBulletin® Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.