Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #578148

    Hello,

    I need your help.

    How can i putting do_shortcode in social media share links ?
    helper-social-media.php

    ex.
    'linkedin' => array("encode"=>true, "encode_urls"=>false, "pattern" => "http://linkedin.com/shareArticle?mini=true&title=<strong>do_shortcode[page_num] - blablabla</strong>"),

    Thanks

    #578150

    Hi koraytastan!

    Not sure if that would work but you could try this.

    'linkedin' => array("encode"=>true, "encode_urls"=>false, "pattern" => "http://linkedin.com/shareArticle?mini=true&title=<strong>".do_shortcode('[page_num]')." - blablabla</strong>"),
    

    Or maybe store it as a variable like so.

    $page_num = do_shortcode('[page_num']);
    'linkedin' => array("encode"=>true, "encode_urls"=>false, "pattern" => "http://linkedin.com/shareArticle?mini=true&title=<strong>".$page_num." - blablabla</strong>"),
    

    Regards,
    Elliott

    #578172

    Not working.

    $page_num = do_shortcode(‘[est_time]’);
    'linkedin' 	=> array("encode"=>true, "encode_urls"=>false, "pattern" => "http://linkedin.com/shareArticle?mini=true&title=".$page_num."⌛&url=[permalink]"),

    'linkedin' => array("encode"=>true, "encode_urls"=>false, "pattern" => "http://linkedin.com/shareArticle?mini=true&title=".do_shortcode('[est_time]').")

    PS: Plugin is Read Time , shortcode is ‘est_time’

    • This reply was modified 8 years, 9 months ago by koraytastan.
    #578952

    Hey!

    Perhaps the shortcode is echoing out the value. Try contacting the plugin authors to see if they have a template tag you can use instead.

    Regards,
    Elliott

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.