Support » Plugin: Simple Links » Shortcode within link

  • Resolved eric.hoegee



    First of all I love the plugin. I got one big problem though:

    I need to use iframe within the link. I installed a plugin for that (Advanced iFrame) which gives me a shortcode. (‘[advanced_iframe securitykey=”xxxxxxx” src=”” width=”100%” height=”550px”]’)

    If i copy this shortcode in my link field it will not work. It strips everything untill where my securitykey starts. (‘[advanced_iframe securitykey=’)

    Is there any way i can make it work like I want?

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


    Hi Eric,

    You may use the description field to enter your shortcode. Then you will have to enable shortcode support by using a couple of the built in filters. You may add the code to your theme’s functions.php file.

    add_filter('simple_links_shortcode_link_meta', 'sl_do_shortcodes');
    add_filter('simple_links_shortcode_link_output', 'sl_prevent_shortcode', 99, 4);
    function sl_prevent_shortcode($link_output, $meta, $link, $image ){
        $link_output = sprintf('<a href="%s" target="%s" title="%s" %s>%s%s</a>',
                                        empty( $meta['link_target_nofollow'][0] ) ? '': 'rel="nofollow"',
        return $link_output;
    function sl_do_shortcodes($meta){
        if( isset( $meta['description'][0] ) ){
            $meta['description'][0] = do_shortcode($meta['description'][0]);
        return $meta;

    Hope this helps!

    Hi Mat,

    Thanks for your advice and code. I placed it in my theme’s functions.php I placed the shortcode in my description field. I guess I need to leave the Web Address field empty right? Anyway, i can’t get it to work. Could you maybe take a look and point me the way? I would be forever grateful! 🙂

    On you will find a link to that is supposed to run the shortcode.

    Hope to hear from you, if you got any questions don’t hesitate…

    Hi Mat,

    The URL right now leads me to the where i am now. So on my pages it leads me to If i click the link in it leads me

    Maybe that helps 🙂

    Thanks in advance

    Plugin Author Mat Lipe


    Hi Eric,
    When you add the shortcode to your content do you have the description turned on?

    If not your shotcode should look something like this.
    [simple-links description="true"]

    To make it link out to you will want to fill in the Web Address field.

    To hide the link and just display the iframe content you could use some css like

    .simple-links-shortcode-item a{
    display: none;

    Hope this helps!

    Hi Mat,

    Thanks for your tips yet again 🙂 Now the iframe opens up, not really like i would want it though. 😉

    I don’t think you understand what I am trying to accomplish here. The idea is that I can have lists of links under each other. I am making a selection of web shops (300+) which i put on different pages with categories. So, I make a link, I put it in Category Department stores. I want it to be displayed just on the pages i selected the category for (could be multiple). So far it works.

    On these pages I want only links, no iframes.

    When links are being clicked I want another page to be opened, within that page the iframe must be opened.

    Hope i made myself clear this time and really hope you are capable and willing to help me out yet again. 🙂

    Thanks and have a good one,


    Plugin Author Mat Lipe


    Hi Eric,

    I’m afraid this is a little beyond my free support.

    You might give the main forum a try and see if someone from the community can give you a hand. I am totally swamped right now with client work.

    Hi Mat,

    I can imagine, no problem. Thanks for all your help anyway!

    Thanks 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Shortcode within link’ is closed to new replies.