Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Sidebars & Widgets »

Style differently the active (just clicked) link in Categories and other widgets


  #1  
Old Feb 27, 2010, 11:17 AM
ymf
 
61 posts · May 2009
Is there a way to style differently the "active" (just clicked) link on WP's "Categories" / "Recent Posts" / "Recent Comments" / "Blogroll" and other rather standard widgets displaying collections of links?

Consider http://wordpress.org/showcase/tag/people/ as a prototype of the desired effect: under the "Popular Tags" in the left column, the link "People" has presently been clicked. Note that "People" is gray and is not clickable. It looks like this:

Popular Tags
CMS (83)
People
Technology (60)

Then, click the blue "Technology (60)" link: it leads to http://wordpress.org/showcase/tag/technology/. Now, "Technology" becomes gray non-clickable, and the link "People (64)" became clickable again:

Popular Tags
CMS (83)
People (64)
Technology
  #2  
Old Feb 27, 2010, 03:13 PM
ymf
 
61 posts · May 2009
I found an answer for "Categories" widget but not for the other kinds of widgets. CSS insert
PHP Code:
li.current-cat a {
    
color:#FF66FF !important;
    
border-left:7px solid #FFDDDD !important;
}
li.current-cat
{
    
color:#66FFFF;
    
background:#EEEEEE none repeat scroll 0 0;

or
PHP Code:
li.current-cat
li.current-cat a {
    
color:#FF66FF !important;
    
border-left:7px solid #FFDDDD !important;
    
background:#EEEEEE none repeat scroll 0 0;

... works for "Categories" widget because the currently chosen list item will have an added class="current-cat" under the "li" element (I guess it's WP's feature, not the themes?).

However the "Recent Posts" / "Recent Comments" / "Blogroll" widgets don't seem to provide any means to tell the currently selected item from the other items on the list (again, I guess it's WP's feature, not the theme's)... Any thoughts?

Last edited by ymf; Feb 27, 2010 at 04:02 PM.
  #3  
Old Mar 3, 2010, 02:58 PM
juggledad's Avatar
juggledad
 
23,682 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
it falls in the lap of the widget author. If they don't output something unique then there is no way to style it.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove Active Link Color in Page Menubar Ber|Art Page & Category Menu Bars 5 Feb 10, 2010 03:09 PM
Bold active page link title - How? snarunas Sidebars & Widgets 11 Oct 20, 2009 07:56 AM
[SOLVED] Style one image differently to others chair Atahualpa 3 Wordpress theme 2 Jul 27, 2009 02:19 AM
disable links in category menu for parent categories (only childless categories link) qcook2000 Page & Category Menu Bars 0 May 15, 2009 09:09 PM
Style widget content differently to bulleted text perdox808 Header configuration & styling 1 Apr 11, 2009 06:03 PM


All times are GMT -6. The time now is 12:43 PM.


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