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)
-   -   Is there a way to make a widget title clickable? (http://forum.bytesforall.com/showthread.php?t=6257)

Rashell Mar 12, 2010 12:11 PM

Is there a way to make a widget title clickable?
ie. as in links to another page


lmilesw Mar 12, 2010 01:44 PM

I know some widgets have that functionality but I know of no way to link any old widget title. Curious to see if someone has an idea.

juggledad Mar 12, 2010 03:12 PM

you would have to edit the plugin's code and put in the link.

I wonder if you could write a plugin that would look for a shortcode, like
[widget-link title='widget title' link='http://domain.com/page']
and apply it correctly.

Rashell Mar 13, 2010 10:34 AM

got it halfway there.

I swapped the functions.php register sidebar with

'name'=>'Right Sidebar',
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<div class="widget-title"><a href="./link"><h3>',
'after_title' => '</h3></a></div>',

But I have to figure out how to make the links dynamic or specific for each widget. Right now they're all linking to


Got any suggestions, anyone?


paulae Mar 13, 2010 01:37 PM

Would the widget's ID help?

Rashell Mar 14, 2010 01:37 PM

I think so. I'm still trying to grapple my mind around the whole dynamic_sidebar_params wordpress thing. I'm not sure if I'd need to list each widget currently in my right sidebar in the functions.php seperately. I'd just go into each widget and change the "title" to a clickable link but there's 1 with a multiple instance I can't do it with.

lmilesw Mar 14, 2010 02:01 PM

I haven't tested it but you might want to look at this plugin for linkable titles.

Rashell Mar 14, 2010 07:30 PM

You know i was checking that out the other day and dismissed it because it didn't answer all my problems at once. Now that I rethink it... it just might do.

Will try it and let you all know.

Thanks you all so so so much for brainstorming with me!!!


Rashell Mar 16, 2010 04:23 PM


Wasn't seeing the forest for the trees there. Rather than messing with the ATA functions.php I could have just as easily created new widget areas inside the right sidebar using a PHP/Text Widget & a new widget area formula similar to...

PHP Code:

<?php bfa_widget_area('name=WidgetAreaName&before_widget=<div id="%1$s" class="header-widget %2$s">&after_widget=</div>&before_title=<div class="widget-title"><h3><a href="http://myurl.com/category/link/that-changes-per-widget">&after_title=</a></h3></div>'); ?>

Any widget that went into this area would have the page link built in... so I was only going to add 1 widget per new widget area. (I only have 5 plugins to link this way)

It works but not flawlessly. I was trying to link the widget/plugin Sideposts. It will only allow you to link one instance. Anymore than that and it destroys your layout. Seems to work fine with other plugins though. Ah well...

On to next brainstorm...


lmilesw Mar 16, 2010 06:21 PM

Me thinks you spend way too much time in front of the computer like I do ;). Happy Brainstorming.

All times are GMT -6. The time now is 12:35 AM.

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