Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Old Version fixes and change logs (http://forum.bytesforall.com/forumdisplay.php?f=37)
-   -   BUGFIX 361-04: Allow Custom Menu widget links to use same styling as Pages widget. (http://forum.bytesforall.com/showthread.php?t=12381)

juggledad Jan 22, 2011 05:49 AM

BUGFIX 361-04: Allow Custom Menu widget links to use same styling as Pages widget.
 
1 Attachment(s)
While not actually a BUG, I've created a bugfix for this enhancement to allow it to be tracked.

Wordpress version 3 introduced a new widget, the 'Custom Menu' widget. This widget used different classes than the 'Pages' widget, which can be styled in the Atahualpa options. The attached css.php has the new classes added to the styling so both will be styled the same.

Edit css.php and change the following lines from
HTML Code:

/* First, remove the left border and padding from the <LI>. The margin stays on the <LI>'s
because if the <A>'s of the cateories widget were set to display:inline (default setting)
then margin would work there */
div.widget_pages ul li,
div.widget_categories ul li {
        border-left: 0 !important;
        padding: 0 !important;
}

/* Then, add left border and padding to the <A> */
div.widget_pages ul li a:link,
div.widget_pages ul li a:visited,
div.widget_pages ul li a:active,
div.widget_categories ul li a:link,
div.widget_categories ul li a:visited,
div.widget_categories ul li a:active {
        padding: 0 0 0 <?php echo $bfa_ata['widget_lists']['link-padding-left']; ?>px;
        border-left: solid <?php echo $bfa_ata['widget_lists']['link-border-left-width']; ?>px #<?php echo $bfa_ata['widget_lists']['link-border-left-color']; ?>;
        }

div.widget_pages ul li a:hover,
div.widget_categories ul li a:hover {
        border-left: solid <?php echo $bfa_ata['widget_lists']['link-border-left-width']; ?>px #<?php echo $bfa_ata['widget_lists']['link-border-left-hover-color']; ?>;
}

div.widget_pages ul li ul li a:link,
div.widget_pages ul li ul li a:visited,
div.widget_pages ul li ul li a:active,
div.widget_categories ul li ul li a:link,
div.widget_categories ul li ul li a:visited,
div.widget_categories ul li ul li a:active {
        padding: 0 0 0 <?php echo $bfa_ata['widget_lists2']['link-padding-left']; ?>px;
        border-left: solid <?php echo $bfa_ata['widget_lists2']['link-border-left-width']; ?>px #<?php echo $bfa_ata['widget_lists2']['link-border-left-color']; ?>;
        }

div.widget_pages ul li ul li a:hover,
div.widget_categories ul li ul li a:hover {
        border-left: solid <?php echo $bfa_ata['widget_lists2']['link-border-left-width']; ?>px #<?php echo $bfa_ata['widget_lists2']['link-border-left-hover-color']; ?>;
}

div.widget_pages ul li ul li ul li a:link,
div.widget_pages ul li ul li ul li a:visited,
div.widget_pages ul li ul li ul li a:active,
div.widget_categories ul li ul li ul li a:link,
div.widget_categories ul li ul li ul li a:visited,
div.widget_categories ul li ul li ul li a:active {
        padding: 0 0 0 <?php echo $bfa_ata['widget_lists3']['link-padding-left']; ?>px;
        border-left: solid <?php echo $bfa_ata['widget_lists3']['link-border-left-width']; ?>px #<?php echo $bfa_ata['widget_lists3']['link-border-left-color']; ?>;
        }

div.widget_pages ul li ul li ul li a:hover,
div.widget_categories ul li ul li ul li a:hover {
        border-left: solid <?php echo $bfa_ata['widget_lists3']['link-border-left-width']; ?>px #<?php echo $bfa_ata['widget_lists3']['link-border-left-hover-color']; ?>;
}

/* The pages widget gets "block" because it usually has only
one link per <LI> and no text */
div.widget_pages ul li a:link,
div.widget_pages ul li a:active,
div.widget_pages ul li a:visited,
div.widget_pages ul li a:hover {
        display: block !important;
}

to
HTML Code:

/* First, remove the left border and padding from the <LI>. The margin stays on the <LI>'s
because if the <A>'s of the cateories widget were set to display:inline (default setting)
then margin would work there */
div.widget_pages ul li,
div.widget_nav_menu ul li,
div.widget_categories ul li {
        border-left: 0 !important;
        padding: 0 !important;
}

/* Then, add left border and padding to the <A> */
div.widget_nav_menu ul li a:link,
div.widget_nav_menu ul li a:visited,
div.widget_nav_menu ul li a:active,
div.widget_pages ul li a:link,
div.widget_pages ul li a:visited,
div.widget_pages ul li a:active,
div.widget_categories ul li a:link,
div.widget_categories ul li a:visited,
div.widget_categories ul li a:active {
        padding: 0 0 0 <?php echo $bfa_ata['widget_lists']['link-padding-left']; ?>px;
        border-left: solid <?php echo $bfa_ata['widget_lists']['link-border-left-width']; ?>px #<?php echo $bfa_ata['widget_lists']['link-border-left-color']; ?>;
        }

div.widget_nav_menu ul li a:hover,
div.widget_pages ul li a:hover,
div.widget_categories ul li a:hover {
        border-left: solid <?php echo $bfa_ata['widget_lists']['link-border-left-width']; ?>px #<?php echo $bfa_ata['widget_lists']['link-border-left-hover-color']; ?>;
}

div.widget_nav_menu ul li ul li a:link,
div.widget_nav_menu ul li ul li a:visited,
div.widget_nav_menu ul li ul li a:active,
div.widget_pages ul li ul li a:link,
div.widget_pages ul li ul li a:visited,
div.widget_pages ul li ul li a:active,
div.widget_categories ul li ul li a:link,
div.widget_categories ul li ul li a:visited,
div.widget_categories ul li ul li a:active {
        padding: 0 0 0 <?php echo $bfa_ata['widget_lists2']['link-padding-left']; ?>px;
        border-left: solid <?php echo $bfa_ata['widget_lists2']['link-border-left-width']; ?>px #<?php echo $bfa_ata['widget_lists2']['link-border-left-color']; ?>;
        }

div.widget_nav_menu ul li ul li a:hover,
div.widget_pages ul li ul li a:hover,
div.widget_categories ul li ul li a:hover {
        border-left: solid <?php echo $bfa_ata['widget_lists2']['link-border-left-width']; ?>px #<?php echo $bfa_ata['widget_lists2']['link-border-left-hover-color']; ?>;
}

div.widget_nav_menu ul li ul li ul li a:link,
div.widget_nav_menu ul li ul li ul li a:visited,
div.widget_nav_menu ul li ul li ul li a:active,
div.widget_pages ul li ul li ul li a:link,
div.widget_pages ul li ul li ul li a:visited,
div.widget_pages ul li ul li ul li a:active,
div.widget_categories ul li ul li ul li a:link,
div.widget_categories ul li ul li ul li a:visited,
div.widget_categories ul li ul li ul li a:active {
        padding: 0 0 0 <?php echo $bfa_ata['widget_lists3']['link-padding-left']; ?>px;
        border-left: solid <?php echo $bfa_ata['widget_lists3']['link-border-left-width']; ?>px #<?php echo $bfa_ata['widget_lists3']['link-border-left-color']; ?>;
        }

div.widget_nav_menu ul li ul li ul li a:hover,
div.widget_pages ul li ul li ul li a:hover,
div.widget_categories ul li ul li ul li a:hover {
        border-left: solid <?php echo $bfa_ata['widget_lists3']['link-border-left-width']; ?>px #<?php echo $bfa_ata['widget_lists3']['link-border-left-hover-color']; ?>;
}

/* The pages widget gets "block" because it usually has only
one link per <LI> and no text */
div.widget_nav_menu ul li a:link,
div.widget_nav_menu ul li a:active,
div.widget_nav_menu ul li a:visited,
div.widget_nav_menu ul li a:hover,
div.widget_pages ul li a:link,
div.widget_pages ul li a:active,
div.widget_pages ul li a:visited,
div.widget_pages ul li a:hover {
        display: block !important;
}

or you can use the attached file which has the changes already applied. Download the file, unzip it and upload it to your Atahualpa 3.6.1 theme folder.

NOTE: this css.php contains the changes in: BUGFIX 361-03: Allow Tag widget links to use Atahualpa widget link styling.

Attachment 1064

damian Jan 22, 2011 09:40 AM

Wow. It worked. Nice job. Thanks!


All times are GMT -6. The time now is 05:33 AM.

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