• Resolved mikolajek

    (@mikolajek)


    I’ve made my own “redesign” of this nice plugin. What I wanted to achieve was to have my links structured and grouped into some categories.

    What I did was adding some links with no url and making their titles bold. It’s not perfect but does distinguish the link groups enough.

    The only problem I have is that even though I haven’t put anything as link address/url, the plugin automatically returns me my blog’s own url (i.e. http://www.fraudiq.eu)… Is there a way to overcome this? I just want to have a “clean” position in the links menu. I’d appreciate suggestions.

    http://wordpress.org/extend/plugins/simple-links/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Mat Lipe

    (@mat-lipe)

    Hi mikolajek,

    There is currently no way to do this by using the built in options. However I did come up with a workaround.

    If you set any links that you do not want to go anywhere to ‘http://test.loc’ and add this filter to your theme’s functions.php file, it should have the desired result.

    add_filter('simple_links_widget_output', 'sl_unlink_headers');
    function sl_unlink_headers($content){
       return str_replace('http://test.loc', '#', $content);
    }

    I have added the featured to the list of possible future plugin releases.

    Hope this helps.

    Cheers.

    Thread Starter mikolajek

    (@mikolajek)

    Thanks for the tip!

    Unfortunately my WP somehow got stuck with my home address – it generates now this: “http://www.fraudiq.eu/#“. Thus, it adds the desired character but at the same time keeps the original data – some motive build-in feature maybe?

    Plugin Author Mat Lipe

    (@mat-lipe)

    HI mikolajek,

    I added a couple new filters and released version 1.8.0 to allow for direct link filtering and to prepare for the future version.

    Please update to version 1.8.0 and then you may use this filter to remove the linking from the links set to http://test.loc

    add_filter( 'simple_links_widget_link_output', 'sl_remove_header_links', 1, 4);
    function sl_remove_header_links( $link_output, $meta, $link, $image ){
            if( $meta['web_address'][0] != 'http://test.loc') return $link_output;
    
            return $link->post_title;
    }

    Hope this helps.

    Cheers

    Thread Starter mikolajek

    (@mikolajek)

    Thank you for your interest in the problem and a rapid answer – I’ll wait for the plugin to appear in the update channel and see whether it helps!

    Thread Starter mikolajek

    (@mikolajek)

    I can’t edit my previous post, so a bit spamming from me…

    But… the news is great – your solution works like a charm! The links aimed to be headers/separators have really become them since their link functionality was removed thanks to this fix.

    Once again many thanks for your support!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Home-made groups and auto-linking problem’ is closed to new replies.