Share Email – Pre-populating subject text with plusses?

Support Forums for LiveMesh Themes & Plugins Forums Peak Theme Support Share Email – Pre-populating subject text with plusses?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #28099
    Brian SadlerBrian Sadler
    Participant

    Ha! The plusses again! Hope you are well.

    When I am on a page (EX: https://www.ryanradler.com/savinginnocence/category/from-the-front-lines/) that contains a SHARE feature in the sidebar and I click the email icon, the link populates properly in a new e-mail (apple mail app), but the subject line has plusses in between the numbers.

    Currently the theme is populating the following as a subject line:

    Subject: ADOPT+A+SURVIVOR

    I realize that if you share a page it’s going to pull the page title, but the plusses in between the title words is a problem – for my client. Is there any way to populate the email subject line with something either generic as opposed to the page title – and if not something generic then is there a way to remove the plusses?

    Thanks,
    Brian

    Attachments:
    #28104
    Brian SadlerBrian Sadler
    Participant
    This reply has been marked as private.
    #28114
    VeenaVeena
    Moderator

    The login credentials seems incorrect. Can you pls check?

    #28124
    Brian SadlerBrian Sadler
    Participant
    This reply has been marked as private.
    #28159
    Brian SadlerBrian Sadler
    Participant
    This reply has been marked as private.
    #28194
    Brian SadlerBrian Sadler
    Participant
    This reply has been marked as private.
    #28213
    RaghavendraRaghavendra
    Moderator

    Sorry about the delay. I don’t have the required permissions to edit the code on your server due to some security setting. Pls activate our child theme (peak-child.zip bundled with the theme) and then add the following piece of code to your child theme functions.php (replacing existing urlencode with rawurlencode for $post_title) –

    if (!function_exists('mo_display_social_media_buttons')) {
        function mo_display_rrssb_social_media_buttons($post_id = null) {
            if (empty($post_id))
                $post_id = get_the_ID();
            $post_title = get_the_title($post_id);
            $post_url = get_permalink($post_id);
            $post_excerpt = get_the_excerpt();
            $featured_image_id = get_post_thumbnail_id($post_id);
            $feature_image_src = wp_get_attachment_image_src($featured_image_id, 'full');
            if ($feature_image_src)
                $feature_image_src = $feature_image_src[0];
    
            ?>
    
            <ul class="rrssb-buttons">
                <li class="rrssb-email">
                    <!-- Replace subject with your message using URL Endocding: http://meyerweb.com/eric/tools/dencoder/ -->
                    <a href="mailto:?subject=<?php echo rawurlencode($post_title); ?>&body=<?php echo urlencode($post_url); ?>">
                <span class="rrssb-icon">
                    <i class="icon-envelope-o"></i>
                </span>
                        <span class="rrssb-text">email</span>
                    </a>
                </li>
                <li class="rrssb-facebook">
                    <!--  Replace with your URL. For best results, make sure you page has the proper FB Open Graph tags in header:
                          https://developers.facebook.com/docs/opengraph/howtos/maximizing-distribution-media-content/ -->
                    <a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo urlencode($post_url); ?>"
                       class="popup">
                <span class="rrssb-icon">
                    <i class="icon-facebook5"></i>
                </span>
                        <span class="rrssb-text">facebook</span>
                    </a>
                </li>
                <li class="rrssb-linkedin">
                    <!-- Replace href with your meta and URL information -->
                    <a href="http://www.linkedin.com/shareArticle?mini=true&url=<?php echo urlencode($post_url); ?>&title=<?php echo rawurlencode($post_title); ?>&summary=<?php echo urlencode($post_excerpt); ?>"
                       class="popup">
                <span class="rrssb-icon">
                    <i class="icon-linkedin4"></i>
                </span>
                        <span class="rrssb-text">linkedin</span>
                    </a>
                </li>
                <li class="rrssb-twitter">
                    <!-- Replace href with your Meta and URL information  -->
                    <a href="http://twitter.com/home?status=<?php echo rawurlencode($post_title); ?>%3A%20<?php echo urlencode($post_url); ?>"
                       class="popup">
                <span class="rrssb-icon">
                    <i class="icon-twitter5"></i>
                </span>
                        <span class="rrssb-text">twitter</span>
                    </a>
                </li>
                <li class="rrssb-googleplus">
                    <!-- Replace href with your meta and URL information.  -->
                    <a href="https://plus.google.com/share?url=<?php echo urlencode($post_url); ?>"
                       class="popup">
                <span class="rrssb-icon">
                    <i class="icon-googleplus2"></i>
                </span>
                        <span class="rrssb-text">google+</span>
                    </a>
                </li>
                <li class="rrssb-pinterest">
                    <!-- Replace href with your meta and URL information.  -->
                    <a href="http://pinterest.com/pin/create/button/?url=<?php echo urlencode($post_url); ?>&media=<?php echo urlencode($feature_image_src); ?>&description=<?php echo rawurlencode($post_title); ?>">
                <span class="rrssb-icon">
                    <i class="icon-pinterest3"></i>
                </span>
                        <span class="rrssb-text">pinterest</span>
                    </a>
                </li>
            </ul>
            <!-- Buttons end here -->
        <?php
        }
    }
    #28214
    RaghavendraRaghavendra
    Moderator

    If the above code works for you, we will include the same into our next update for the theme.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Peak Theme Support’ is closed to new topics and replies.