Adding instagram to blog post pages and linking social media

This topic has 14 replies, 3 voices, and was last updated 9 years ago ago by Eva Kemp

  • Avatar: Lily
    Lily
    Participant
    March 10, 2015 at 11:09

    Hi,

    Where do I add Instagram to blog post pages?

    And where do I insert details to connect with Social Media –

    Facebook
    Pinterest
    Instagram
    Twitter

    Also I want to remove #

    Email and
    Google+

    From blog posts.

    Please, contact administrator
    for this information.
    13 Answers
    Avatar: Eva
    Eva Kemp
    Support staff
    March 10, 2015 at 16:49

    Hello,

    To add Instagram icon you need use some plugin as by default we don’t have it.
    Also you can edit social media icons in the file wp-content/themes/legenda/framework/shortcodes.php (lines 1259-1273).

    Regards,
    Eva Kemp.

    Avatar: Lily
    Lily
    Participant
    March 11, 2015 at 19:00

    Hi

    Many thanks for that, but if I need a plugin then can I add the icon to the row of icons from your theme default?

    Avatar: Eva
    Eva Kemp
    Support staff
    March 12, 2015 at 09:45

    Hello,

    Yes, you can add your code in the file legenda/framework/shortcodes.php to get Instagram icon shown.

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: Lily
    Lily
    Participant
    April 15, 2015 at 10:20

    Hi,

    Sorry for not coming back quicker, so how do I add the correct URLs for my Facebook/G+/Instagram etc?

    As I cannot find anywhere to add the share URLs for Blog post pages – for example this page http://www.synaxishosting.co.uk/testing/lily/our-summer-party-with-streethub/#more-295

    And then same for product pages: http://www.synaxishosting.co.uk/testing/lily/product/lace-and-faceted-bead-necklace-with-bow/

    Cheers

    Avatar: Brian Johnson
    Brian Johnson
    Member
    April 15, 2015 at 11:01

    Hello

    I see that social icons are displayed well on your pages (please check the screenshot)
    Did you find your answer in editing legenda/framework/shortcodes.php or some additional assistance is needed?

    With best regards,
    Brian Johnson

    Avatar: Lily
    Lily
    Participant
    April 15, 2015 at 11:56

    hi,

    Correct I put the additional social icon for instagram but where do I insert the URLs to link the icons to my facebook account? Or G+ or Instragram, or Pinterest?

    Avatar: Eva
    Eva Kemp
    Support staff
    April 15, 2015 at 13:46

    Hello,

    You need edit the file wp-content/themes/legenda/framework/shortcodes.php (find the section “! Share This Product”, line 1238) and edit the links, for example for facebook icon you need edit the code <a href="http://www.facebook.com/sharer.php?u='.$permalink.'&images='.$image.'" target="_blank"><span class="icon-facebook"></span></a> and replace http://www.facebook.com/sharer.php?u='.$permalink.'&images='.$image.' with your Facebook url.

    Regards,
    Eva Kemp.

    Avatar: Lily
    Lily
    Participant
    April 15, 2015 at 14:59

    Hi,

    Thanks I have added the URLs of my website, but all it does is take the visitor to my Facebook homepage, it doesn’t ‘share’ the product so what do I enter to achieve this?

    Rather than just pointing at my Facebook page?

    many thanks

    Avatar: Eva
    Eva Kemp
    Support staff
    April 15, 2015 at 15:02

    Hello,

    If you want to share items you need leave the default code as it was in shortcodes.php file.
    Please reupload it from the theme package and “share” links should work.

    Regards,
    Eva Kemp.

    Avatar: Lily
    Lily
    Participant
    April 15, 2015 at 15:04

    So what is the coding for instagram share?

    Avatar: Brian Johnson
    Brian Johnson
    Member
    April 15, 2015 at 15:27

    You may add this code into the fuctions.php of the Child Theme and edit it without touching theme core files which can be overwritten wth next theme update:

    function remove_parent_functions() {
    
    remove_shortcode('share', 'etheme_share_shortcode');
    add_shortcode('share', 'etheme_share_shortcode_child');
    } 
    
    add_action('init','remove_parent_functions');
    
    function etheme_share_shortcode_child($atts, $content = null) {
    	extract(shortcode_atts(array(
    		'title'  => '',
    		'text' => '',
    		'tooltip' => 1,
    		'class' => ''
    	), $atts));
    	global $post;
    	if(!isset($post->ID)) return;
        $html = '';
    	$permalink = get_permalink($post->ID);
    	$tooltip_class = '';
    	if($tooltip) {
    		$tooltip_class = 'title-toolip';
    	}
    	$image =  etheme_get_image( get_post_thumbnail_id($post->ID), 150,150,false);
    	$post_title = rawurlencode(get_the_title($post->ID)); 
    	if($title) $html .= '<span class="share-title hidden-xs">'.$title.'</span>';
    	$html .= '
    	<ul class="menu-social-icons '.$class.'">
    			<li>
    				<a href="https://twitter.com/share?url='.$permalink.'&text='.$post_title.'" class="'.$tooltip_class.'" title="'.__('Twitter', ETHEME_DOMAIN).'" target="_blank">
    					<i class="ico-twitter"></i>
    					<svg width="38" height="38" xmlns="http://www.w3.org/2000/svg" class="circle">
    							<circle cx="19" cy="19" r="18" fill="rgba(255,255,255,0)" stroke="#000000"></circle>
    					</svg>
    				</a>
    			</li>
    			<li>
    				<a href="http://www.facebook.com/sharer.php?u='.$permalink.'&images='.$image.'" class="'.$tooltip_class.'" title="'.__('Facebook', ETHEME_DOMAIN).'" target="_blank">
    					<i class="ico-facebook"></i>
    					<svg width="38" height="38" xmlns="http://www.w3.org/2000/svg" class="circle">
    							<circle cx="19" cy="19" r="18" fill="rgba(255,255,255,0)" stroke="#000000"></circle>
    					</svg>
    				</a>
    			</li>
    			<li>
    				<a href="http://pinterest.com/pin/create/button/?url='.$permalink.'&media='.$image.'&description='.$post_title.'" class="'.$tooltip_class.'" title="'.__('Pinterest', ETHEME_DOMAIN).'" target="_blank">
    					<i class="ico-pinterest"></i>
    					<svg width="38" height="38" xmlns="http://www.w3.org/2000/svg" class="circle">
    							<circle cx="19" cy="19" r="18" fill="rgba(255,255,255,0)" stroke="#000000"></circle>
    					</svg>
    				</a>
    			</li>
    			<li>
    				<a href="http://plus.google.com/share?url='.$permalink.'&title='.$text.'" class="'.$tooltip_class.'" title="'.__('Google +', ETHEME_DOMAIN).'" target="_blank">
    					<i class="ico-google-plus"></i>
    					<svg width="38" height="38" xmlns="http://www.w3.org/2000/svg" class="circle">
    							<circle cx="19" cy="19" r="18" fill="rgba(255,255,255,0)" stroke="#000000"></circle>
    					</svg>
    				</a>
    			</li>
    			<li>
    				<a href="mailto:enteryour@addresshere.com?subject='.$post_title.'&body=Check%20this%20out:%20'.$permalink.'" class="'.$tooltip_class.'" title="'.__('Mail to friend', ETHEME_DOMAIN).'" target="_blank">
    					<i class="ico-envelope"></i>
    					<svg width="38" height="38" xmlns="http://www.w3.org/2000/svg" class="circle">
    							<circle cx="19" cy="19" r="18" fill="rgba(255,255,255,0)" stroke="#000000"></circle>
    					</svg>
    				</a>
    			</li>
    			<li>
                    <a href="http://instagram.com/?url='.$permalink.'&media='.$image.'&description='.$post_title.'" title="'.__('Share On Instagram', ETHEME_DOMAIN).'" target="_blank">
                        <i class="ico-instagram"></i>
                        <svg width="38" height="38" xmlns="http://www.w3.org/2000/svg" class="circle">
                                <circle cx="19" cy="19" r="18" fill="rgba(255,255,255,0)" stroke="#cda85c"></circle></svg>
                    </a>
    </li>
    		</ul>
    	';
    	return $html;
    }

    Child theme lays within zipped package from the themefores.net.Please read here about Child theme in wordpress.

    With best regards
    Brian Johnson

    Avatar: Lily
    Lily
    Participant
    April 15, 2015 at 16:20

    Hi

    Thanks, I didn’t know I was using a child theme?

    Am i?

    Avatar: Eva
    Eva Kemp
    Support staff
    April 15, 2015 at 17:25

    Hello,

    You’re using parent theme but to prevent losing changes after theme update you can create it http://codex.wordpress.org/Child_Themes and add the code for Instagram icon.

    Regards,
    Eva Kemp.

  • Viewing 14 results - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.Log in/Sign up

Helpful Topics

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.