Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » New Versions, & Updating » Old Version fixes and change logs »

BUGFIX 361-04: Allow Custom Menu widget links to use same styling as Pages widget.


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Jan 22, 2011, 04:49 AM
juggledad's Avatar
juggledad
 
22,244 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
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.

css.zip
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; Jan 22, 2011 at 04:58 AM.
  #2  
Old Jan 22, 2011, 08:40 AM
damian
 
22 posts · Feb 2010
Wow. It worked. Nice job. Thanks!

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
BUGFIX 361-03: Allow Tag widget links to use Atahualpa widget link styling. juggledad Old Version fixes and change logs 3 Jan 14, 2011 03:56 PM
BUGFIX 361-01: meta tags not appearing in generated source juggledad Old Version fixes and change logs 5 Jan 13, 2011 03:57 AM
Styling Custom Widget Area bigwavedesign Sidebars & Widgets 5 Nov 12, 2010 03:47 PM
BUGFIX 351/352-06: BFA Subscribe widget does use link colors in widget options juggledad Old Version fixes and change logs 0 Jul 12, 2010 08:21 AM


All times are GMT -6. The time now is 01:57 PM.


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