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

    How to customize social share icons?


    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 class="social-wrap">
                    <?php if (tritmix_get_theme_option('social_share_facebook')): ?>
                        <a class="social-facebook"
                           href="<?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>
                    <?php endif; ?>
                    <?php if (tritmix_get_theme_option('social_share_twitter')): ?>
                        <a class="social-twitter"
                           href="<?php esc_attr(get_the_title()); ?> <?php the_permalink(); ?>"
                           title="<?php esc_attr_e('Share on Twitter', 'tritmix'); ?>">
                            <i class="tritmix-icon-twitter"></i>
                            <span><?php esc_html_e('Twitter', 'tritmix'); ?></span>
                    <?php endif; ?>
                    <?php if (tritmix_get_theme_option('social_share_linkedin')): ?>
                        <a class="social-linkedin"
                           href="<?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>
                    <?php endif; ?>
                    <?php if (tritmix_get_theme_option('social_share_pinterest')): ?>
                        <a class="social-pinterest"
                           href="<?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>
                    <?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>
                    <?php endif; ?>
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.