Support Forums for LiveMesh Themes & Plugins › Forums › Peak Theme Support › Share Email – Pre-populating subject text with plusses?
Tagged: share email subject line
- This topic has 7 replies, 3 voices, and was last updated 6 years, 4 months ago by Raghavendra.
-
AuthorPosts
-
November 7, 2017 at 6:10 am #28099Brian SadlerParticipant
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,
BrianNovember 7, 2017 at 6:11 am #28104Brian SadlerParticipantThis reply has been marked as private.November 7, 2017 at 10:46 am #28114VeenaModeratorThe login credentials seems incorrect. Can you pls check?
November 8, 2017 at 7:50 am #28124Brian SadlerParticipantThis reply has been marked as private.November 9, 2017 at 5:37 pm #28159Brian SadlerParticipantThis reply has been marked as private.November 12, 2017 at 10:41 am #28194Brian SadlerParticipantThis reply has been marked as private.November 13, 2017 at 1:23 pm #28213RaghavendraModeratorSorry 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 } }
November 13, 2017 at 1:25 pm #28214RaghavendraModeratorIf the above code works for you, we will include the same into our next update for the theme.
-
AuthorPosts
- The forum ‘Peak Theme Support’ is closed to new topics and replies.