1

i would like put link after each widget in dynamic sidebar. I thinks is possible if i use static sidebar, but i don't found any tutorial for this.

Thanks you

1
  • 1
    Welcome on the SO, we have SE Wordpress page for this kind of question wordpress.stackexchange.com
    – igor milla
    Mar 3, 2011 at 13:53

1 Answer 1

1

If you useWidget Logic it adds a new filter

widget_content

which you can hook your function to and add link to it somthing like:

add_filter('widget_content','add_link_to_widgets');
function add_link_to_widgets($content){
   return $content . '<br /><a href="http://www.domain.com">my link</a>'
}

Update

You are missing the point, the plugin is great if you want to use his ability to limit the display of widgets, Beside that it add a new filter.

so you can use that filter like i said to add your links, each widget has an id you can add the link based on that.

3
  • Thanks but what I put in field widget logic ?
    – IA.Design
    Mar 3, 2011 at 15:56
  • Nothing unless you want to use the logic part of the widget logic
    – Bainternet
    Mar 3, 2011 at 16:00
  • So I put "add_filter('widget_content','add_link_to_widgets'); function add_link_to_widgets($content){ return $content . '<br /><a href="domain.com">my link</a>' }" in functions.php and if i want unique link for each widget ?
    – IA.Design
    Mar 3, 2011 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.