Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #11151
    Avatarcajic87
    Support Expired

    How to customize social share icons?

    #11155

    Please copy this function and paste to the file functions.php ( child-them), then edit this code:

    function tritmix_social_share() {
            if (tritmix_get_theme_option('social_share')) {
                ?>
                <div class="tritmix-social-share">
                    <div class="social-share-title">
                        <i class="tritmix-icon-share"></i>
                        <span><?php esc_html_e('Share', 'tritmix'); ?></span>
                    </div>
                    <div class="social-wrap">
                    <?php if (tritmix_get_theme_option('social_share_facebook')): ?>
                        <a class="social-facebook"
                           href="http://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>&display=page"
                           target="_blank" title="<?php esc_attr_e('Share on facebook', 'tritmix'); ?>">
                            <i class="tritmix-icon-facebook"></i>
                            <span><?php esc_html_e('Facebook', 'tritmix'); ?></span>
                        </a>
                    <?php endif; ?>
    
                    <?php if (tritmix_get_theme_option('social_share_twitter')): ?>
                        <a class="social-twitter"
                           href="http://twitter.com/home?status=<?php esc_attr(get_the_title()); ?> <?php the_permalink(); ?>"
                           target="_blank"
                           title="<?php esc_attr_e('Share on Twitter', 'tritmix'); ?>">
                            <i class="tritmix-icon-twitter"></i>
                            <span><?php esc_html_e('Twitter', 'tritmix'); ?></span>
                        </a>
                    <?php endif; ?>
    
                    <?php if (tritmix_get_theme_option('social_share_linkedin')): ?>
                        <a class="social-linkedin"
                           href="http://linkedin.com/shareArticle?mini=true&url=<?php the_permalink(); ?>&title=<?php the_title(); ?>"
                           target="_blank" title="<?php esc_attr_e('Share on LinkedIn', 'tritmix'); ?>">
                            <i class="tritmix-icon-linkedin"></i>
                            <span><?php esc_html_e('Linkedin', 'tritmix'); ?></span>
                        </a>
                    <?php endif; ?>
                    <?php if (tritmix_get_theme_option('social_share_pinterest')): ?>
                        <a class="social-pinterest"
                           href="http://pinterest.com/pin/create/button/?url=<?php echo esc_url(urlencode(get_permalink())); ?>&description=<?php echo esc_attr(urlencode(get_the_title())); ?>&; ?>"
                           target="_blank" title="<?php esc_attr_e('Share on Pinterest', 'tritmix'); ?>">
                            <i class="tritmix-icon-pinterest-p"></i>
                            <span><?php esc_html_e('Pinterest', 'tritmix'); ?></span>
                        </a>
                    <?php endif; ?>
    
                    <?php if (tritmix_get_theme_option('social_share_email')): ?>
                        <a class="social-envelope"
                           href="mailto:?subject=<?php the_title(); ?>&body=<?php the_permalink(); ?>"
                           title="<?php esc_attr_e('Email to a Friend', 'tritmix'); ?>">
                            <i class="tritmix-icon-envelope"></i>
                            <span><?php esc_html_e('Email', 'tritmix'); ?></span>
                        </a>
                    <?php endif; ?>
                    </div>
                </div>
                <?php
            }
        }
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.