-
AuthorPosts
-
December 11, 2015 at 2:20 pm #703193
PierreMeul
ParticipantI am not sure what is happening nor what I should check.
This button is selected from the Portfolio options to show and it shows up at bottom of the page but when I click, I only see the mailto:?subject…and the message but nothing happen…
December 11, 2015 at 7:08 pm #703512Friech
ModeratorHi There,
Thanks for writing in! The mailto link should open the default email application (outlook, thunderbird, etc.) of your machine. You can also set up your browser to be the default email application with a Gmail account.
http://blog.hubspot.com/marketing/set-gmail-as-browser-default-email-client-ht
Hope it helps, Cheers!
December 12, 2015 at 3:17 am #703804PierreMeul
ParticipantRe-tested and it is working now. Not sure what happened yesterday.
December 12, 2015 at 3:28 am #703816Rue Nel
ModeratorHey There,
It is good to know that it is working now.
If you need anything else we can help you with, don’t hesitate to open another thread.Best Regards,
XDecember 12, 2015 at 3:43 am #703827PierreMeul
ParticipantI now tested but it failed… this code from another post of this forum to allow me to chnage the text of the Share via email button. The result is that all my site goes blank. I am not sure what I should chnaged.
I just put this code in my x-child theme in the functions.php and boum… all blank pages, cannot have my site displayed anymore. There must be something with his code: I am unsure why the initial code had no carriage return on the next line for some lines while I have the lines like this below… does it matter?
function custom_shortcode_entry_share( $atts ) {
extract( shortcode_atts( array(
‘id’ => ”,
‘class’ => ”,
‘style’ => ”,
‘title’ => ”,
‘facebook’ => ”,
‘twitter’ => ”,
‘google_plus’ => ”,
‘linkedin’ => ”,
‘pinterest’ => ”,
‘reddit’ => ”,
’email’ => ”
), $atts ) );$share_url = urlencode( get_permalink() );
$share_title = urlencode( get_the_title() );
$share_source = urlencode( get_bloginfo( ‘name’ ) );
$share_content = urlencode( get_the_excerpt() );
$share_media_info = wp_get_attachment_image_src( get_post_thumbnail_id(), ‘full’ );
$share_media = $share_media_info[0];$id = ( $id != ” ) ? ‘id=”‘ . esc_attr( $id ) . ‘”‘ : ”;
$class = ( $class != ” ) ? ‘x-entry-share ‘ . esc_attr( $class ) : ‘x-entry-share’;
$style = ( $style != ” ) ? ‘style=”‘ . $style . ‘”‘ : ”;
$title = ( $title != ” ) ? $title : __( ‘Share this Post’, ‘__x__’ );
$facebook = ( $facebook == ‘true’ ) ? “<i class=\”x-icon-facebook-square\”></i>” : ”;
$twitter = ( $twitter == ‘true’ ) ? “<i class=\”x-icon-twitter-square\”></i>” : ”;
$google_plus = ( $google_plus == ‘true’ ) ? “<i class=\”x-icon-google-plus-square\”></i>” : ”;
$linkedin = ( $linkedin == ‘true’ ) ? “<i class=\”x-icon-linkedin-square\”></i>” : ”;
$pinterest = ( $pinterest == ‘true’ ) ? “<i class=\”x-icon-pinterest-square\”></i>” : ”;
$reddit = ( $reddit == ‘true’ ) ? “<i class=\”x-icon-reddit-square\”></i>” : ”;
$email = ( $email == ‘true’ ) ? “<span><i class=\”x-icon-envelope-square\”></i></span>” : ”;$output = “<div {$id} class=\”{$class}\” {$style}>”
. ‘<p>’ . $title . ‘</p>’
. ‘<div class=”x-share-options”>’
. $facebook . $twitter . $google_plus . $linkedin . $pinterest . $reddit . $email
. ‘</div>’
. ‘</div>’;return $output;
}add_filter(‘init’, ‘custom_entry_share’);
function custom_entry_share() {
remove_shortcode( ‘share’ );
add_shortcode( ‘share’, ‘custom_shortcode_entry_share’ );
}December 12, 2015 at 4:32 am #703857Thai
ModeratorHi There,
Please try with this code instead:
function custom_shortcode_entry_share( $atts ) { extract( shortcode_atts( array( 'id' => '', 'class' => '', 'style' => '', 'title' => '', 'facebook' => '', 'twitter' => '', 'google_plus' => '', 'linkedin' => '', 'pinterest' => '', 'reddit' => '', 'email' => '' ), $atts ) ); $share_url = urlencode( get_permalink() ); $share_title = urlencode( get_the_title() ); $share_source = urlencode( get_bloginfo( 'name' ) ); $share_content = urlencode( get_the_excerpt() ); $share_media_info = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ); $share_media = $share_media_info[0]; $id = ( $id != '' ) ? 'id="' . esc_attr( $id ) . '"' : ''; $class = ( $class != '' ) ? 'x-entry-share ' . esc_attr( $class ) : 'x-entry-share'; $style = ( $style != '' ) ? 'style="' . $style . '"' : ''; $title = ( $title != '' ) ? $title : __( 'Share this Post', '__x__' ); $facebook = ( $facebook == 'true' ) ? "<i class=\"x-icon-facebook-square\"></i>" : ''; $twitter = ( $twitter == 'true' ) ? "<i class=\"x-icon-twitter-square\"></i>" : ''; $google_plus = ( $google_plus == 'true' ) ? "<i class=\"x-icon-google-plus-square\"></i>" : ''; $linkedin = ( $linkedin == 'true' ) ? "<i class=\"x-icon-linkedin-square\"></i>" : ''; $pinterest = ( $pinterest == 'true' ) ? "<i class=\"x-icon-pinterest-square\"></i>" : ''; $reddit = ( $reddit == 'true' ) ? "<i class=\"x-icon-reddit-square\"></i>" : ''; $email = ( $email == 'true' ) ? "<span><i class=\"x-icon-envelope-square\"></i></span>" : ''; $output = "<div {$id} class=\"{$class}\" {$style}>" . '<p>' . $title . '</p>' . '<div class="x-share-options">' . $facebook . $twitter . $google_plus . $linkedin . $pinterest . $reddit . $email . '</div>' . '</div>'; return $output; } add_action('init', 'custom_entry_share'); function custom_entry_share() { remove_shortcode( 'share' ); add_shortcode( 'share', 'custom_shortcode_entry_share' ); }
The shortcode:
[share twitter="true" facebook="true" email="true"]
Let us know how it goes!
December 12, 2015 at 11:38 am #704094PierreMeul
ParticipantThat code works OK but how do I go with changing the text of the Share via Email button that says “Hey, …” ?
December 12, 2015 at 11:52 am #704121Thai
ModeratorHi There,
You can try with this shortcode:
[share twitter="true" facebook="true" email="true" email_subject="Your new email subject will go here"]
Hope it helps 🙂
December 12, 2015 at 12:00 pm #704127PierreMeul
ParticipantI am unsure where I would have to put that shortcode… The idea is to have all my portfolio pages reflecting this.
Also how would I do with changing the label of the social icon?December 12, 2015 at 7:25 pm #704377Rue Nel
ModeratorHello There,
Sorry for the confusion. To change text of the Share via Email button that says “Hey, thought you might enjoy this! Check it out when you have a chance”, since you already have your child theme active and ready, please insert this following code in your child theme’s functions.php file.
function change_email_subject($translated) { $your_text = "insert your translation here"; $translated = str_ireplace('Hey, thought you might enjoy this! Check it out when you have a chance:', $your_text, $translated); return $translated; } add_filter('gettext', 'change_email_subject' );
Please let us know if this works out for you.
December 13, 2015 at 2:26 am #704594PierreMeul
ParticipantYes, this code works. Thank you.
December 13, 2015 at 2:38 am #704605Christopher
ModeratorYou’re welcome.
December 13, 2015 at 3:16 am #704615PierreMeul
ParticipantHow do I go now with changing the text of the Social buttons on each of the portfolio pages?
I mean, today when you hover on these it says something like “Share via …” and I’d like to see it in French like “Partager via …”
December 13, 2015 at 3:41 am #704626Christopher
ModeratorHi there,
Please translate strings in x.pot file.
Please check this link : https://community.theme.co/kb/translation/Thanks.
December 13, 2015 at 4:10 am #704643PierreMeul
ParticipantThank you for this link. I may consider this process once I have more time.
I have a x-child theme set already, wouldn’t you have a few lines of code to just change that?
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-703193 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>