Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #578487

    Hello,

    I have 2 problem on social media share links.

    1)
    I want custom title for social media links.
    ex.
    title = Best Theme Enfold
    Reading time plugin (do_shortcode(“[est_time]”) = 2 minutes
    *result (must be)= Best Theme Enfold | 2 minutes
    How can i put this shortcode or any string ?

    2) When i was sharing any page result is any social websites;
    Title ” Best Theme Enfold – My Web Page ”
    How can i remove “my web page ” text

    Thanks for helpss

    Regards.

    #579132

    Hey koraytastan!

    Thank you for using Enfold.

    1.) Are you referring to the social share links or the social media icons in the top bar? If it is the latter, you can modify the includes > helper-social-media.php file. Look for this code around line 83 which contains the social media icon markup including the title attribute:

    	$html .= "<a {$blank} href='".$icon['social_icon_link']."' ".av_icon_string($icon['social_icon'])." title='".ucfirst($icon['social_icon'])."'><span class='avia_hidden_link_text'>".ucfirst($icon['social_icon'])."</span></a>";
    

    If it is the social share section in the posts, use the “avia_social_share_link_arguments” filter. Example here: https://kriesi.at/support/topic/share-button-twitter-handle-not-showing-when-people-are-sharing/#post-578267

    2.) Use the “avia_social_share_link_arguments” in order to change the share section pattern. https://kriesi.at/support/topic/share-button-twitter-handle-not-showing-when-people-are-sharing/#post-578267

    Regards,
    Ismael

    #579191

    Thanks for reply Ismael,

    But i could not tell you exactly.Sorry.

    title = Best Theme Enfold
    Reading time plugin shortcode = [est_time]

    helper-social-media.php (maybe 150 line)

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

    Sharing content title result = Title – “.do_shortcode(‘[est_time]’).” – My Web Site

    I want = Title – 2 minutes
    (i also don’t want “My Web Site” text in sharing content title.

    Thanks

    #579237

    Hey!

    Replace your code with the following and try again

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

    Let us know if that helps

    Regards,
    Basilis

    #579282

    Thanks for reply but result is :
    Title – My Web Site Name

    also linkedin giving link error.
    :(

    #580960

    Hi!

    can you provide us a link to your site showing the elements in question please? we need to be able to inspect the elements.

    Cheers!
    Andy

    #581166

    WEB

    Title: “2016’da Kaçırmamanız Gereken 5 Tasarım Trendi”
    Read Time(below title) = “2 dakika”

    When i was sharing link result is must be = “2016’da Kaçırmamanız Gereken 5 Tasarım Trendi – 2 dakika”

    Thanks..

    #582135

    Hey!

    Where did you get the shortcode? Is it possible to get the value of the shortcode via custom field? https://codex.wordpress.org/Custom_Fields

    Please try this in the functions.php file:

    // modify social share args
    add_filter('avia_social_share_link_arguments', 'avia_add_social_share_link_arguments', 10, 1);
    function avia_add_social_share_link_arguments($args)
    {
    	$readtime = do_shortcode('[est_time]');
    	$args['linkedin']['pattern'] = 'http://linkedin.com/shareArticle?mini=true&title=[title]'.$readtime.'&url=[permalink]';
    	return $args;
    }

    The example below works on our installation but I’m not sure if it is going to work with the custom shortcode above:

    // modify social share args
    add_filter('avia_social_share_link_arguments', 'avia_add_social_share_link_arguments', 10, 1);
    function avia_add_social_share_link_arguments($args)
    {
    	$readtime = get_the_time(get_option('date_format'));
    	$args['linkedin']['pattern'] = 'http://linkedin.com/shareArticle?mini=true&title=[title]'.$readtime.'&url=[permalink]';
    	return $args;
    }

    Regards,
    Ismael

    #582183

    Thanks Ismael. It’s working. How can i add facebook, twitter links ?

    #582898

    Hey!

    Add the pattern below the existing one. For facebook and twitter, something like this will work:

    $args['facebook']['pattern'] = 'http://www.facebook.com/sharer.php?u=[permalink]&t=[title]';
    $args['twitter']['pattern'] = 'https://twitter.com/share?text=[title]&url=[shortlink]';
    

    Add the shortcode variable inside the text query. You can find the social patterns inside the helper-social-media.php file starting from line 147.

    Best regards,
    Ismael

    #582992

    Twitter is working on function.php but facebook pattern result is only title.

    #585608

    Hi!

    Does it work if you do the modification in the main file, /includes/helper-social-media.php (line 147)?

    'facebook' 	=> array("encode"=>true, "encode_urls"=>false, "pattern" => "http://www.facebook.com/sharer.php?u=[permalink]&t=[title]"),
    

    Cheers!
    Josue

    #586058

    Thanks

    İ solved the problem.

    in functions.php. “&t” must be “&title”

    $args['facebook']['pattern'] = 'http://www.facebook.com/sharer.php?u=[permalink]&title=[title]⌛'.$readtime.'';

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Custom title’ is closed to new replies.