Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author king-theme

    (@kingthemes)

    Hi!

    The link param will return “link|target|title”. To use it,

    $link = explode( $atts['link'] );
    // now we have an array ( "link", "target", "title" );
    
    echo '<a href="'.$link[0].'" target="'.$link[1].'">'.$link[2].'</a>';
    Thread Starter CodeCans

    (@mr_sagar)

    Hi,
    I tried avobe Code which you are wrote.
    But It’s still not working.

    See what i did:
    In field:

    array(
                            'name' => 'but_link',
                            'label' => 'Button URL',
                            'type' => 'link',
                            'value' => 'link|caption|target',
                            'description' => 'Chose Button URL here',
                        ),

    Trying to get Value Properly:

    $but_link = explode( $atts['but_link'] );
    echo '<a href="'.$but_link[0].'" target="'.$but_link[1].'">'.$but_link[2].'</a>';

    I tried But Failed Please fix this soon and give us instruction how to get Link Value Properly
    it showing in output:

    Warning: explode() expects at least 2 parameters, 1 given in C:\xampp\htdocs\practise\wp-content\plugins\rd-extensions-bundle-for-king-composer\shortcodes\pricing-table\king-pricingtable-shortcode.php on line 158

    See screenshot: https://prntscr.com/bhresn

    Plugin Author king-theme

    (@kingthemes)

    Hi,

    Would you send your maps code to email [email protected] ?

    I’ll correct it for you. Sorry for delay at the weekend

    Thread Starter CodeCans

    (@mr_sagar)

    Hi,
    I have sent you email with Full Code. Please see attached and give a proper solution.
    Regard
    RD Development

    Plugin Author king-theme

    (@kingthemes)

    Hi,

    You easy can see the trouble with explode() function,

    $but_link = explode( ",", $atts['but_link'] );
    echo '<a href="'.$but_link[0].'" target="'.$but_link[1].'">'.$but_link[2].'</a>';

    I’ve also replied your another question https://www.ads-software.com/support/topic/params-relation-not-working-with-group-fields?replies=3#post-8545605

    Thread Starter CodeCans

    (@mr_sagar)

    Hi Kingtheme,
    I appreciate your are helpful, But still link param not working to getting value.
    I have tried your last solution But Get Nothing In output, Did you write above solution after testing??

    see which i have tried IN MAP params:

    // Button URL
    	        array(
                            'name' => 'but_link',
                            'label' => 'Button URL',
                            'type' => 'link',
                            'value' => 'link|caption|target',
                            'description' => 'Chose Button URL here',
                        ),

    To getting Output in shortcode i use this:

    $but_link = explode( ",", $atts['but_link'] );
    echo '<a href="'.$but_link[0].'" target="'.$but_link[1].'">'.$but_link[2].'</a>';

    I think i putted it correctly but your code not working. please i need this solution as soon.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to use link params properly’ is closed to new replies.