Simple Links
[resolved] linking the title? (5 posts)

  1. AJ's WebCreations
    Posted 3 years ago #

    I like the look of this widget and wanted to see if it can do what I am looking for. I have two text box widgets and one link box widget in a side bar. I need to link the title of each to a page, I have found a text box widget that will let me make the title into a link but cannot find a link box widget the will let me make the title a link. I wanted to see if this could be done with yours or if not if you could maybe add that option?


  2. Mat Lipe
    Plugin Author

    Posted 3 years ago #

    Hello DnA,

    It is possible to link the widget title using a built in filter titled 'simple_links_widget_settings'.

    Add this code to your theme's functions.php file and change the link to wherever you would like the title to link to and it should work just fine.

    add_filter('simple_links_widget_settings', 'sl_link_title');
    function sl_link_title( $instance ){
    	/** Url to where you want this to link to goes here **/
    	$link = "http://lipeimagination.info"; 
    	$instance['title'] = sprintf('<a href="%s">%s</a>', $link, $instance['title']);
    	return $instance;

    This particular filter will change the link of the title in every Simple Links widget. If you would like to change a specific one or different links for different ones you will have to change the first line to match the id of the widget like so.
    add_filter('simple_links_widget_settings_simple-links-3', 'sl_link_title');

    Hope this helps.

  3. AJ's WebCreations
    Posted 3 years ago #

    Thanks for the fast reply I will try that.

  4. AJ's WebCreations
    Posted 3 years ago #

    This works but I can only see one link I imported them and it shows them in admin panel but when I go to the page it only shows 2 links. And only shows 2 link in firebug.

  5. AJ's WebCreations
    Posted 3 years ago #

    I got it figured out.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple Links
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.