Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1393641
    CEDRIC
    Participant

    Hello,

    I saw this post https://community.theme.co/forums/topic/share-buttons-on-all-blog-post-formats/ which help me.
    But I need to add with these social buttons a print button.

    How can I do that ?

    Another issue with these icons… it don’t display : the codes “x-social-XXX” need a update (the original post is from 2014).

    Thank marvellous team!

    #1394135
    Christopher
    Moderator

    Hi there,

    Please setup child theme and insert following code in child theme’s functions.php file :

    add_filter( 'the_content', 'add_share_button' );
    function add_share_button($content){
      if ( is_singular('post' || 'page') ) {
        $content .= do_shortcode('[share title="Share this Post" email="true"]<a class="x-btn" onClick="window.print()">Print this page</a>
    ');
    
      }
    
      return $content;
    
    }
    

    Hope it helps.

    #1395070
    CEDRIC
    Participant

    Hello,

    Thank you very much.

    And there is no possibility to add into this share block a print button, like this :

    [share title="Partager" email="true" facebook="true" twitter="true" linkedin="true" google_plus="true" pinterest="true" print="true"]

    Because, print a page is a sort to sharing information 🙂 no?

    #1395078
    CEDRIC
    Participant

    And it is possible to translate tooltip ?
    for french version.

    Thanks

    #1395183
    Christian
    Moderator

    Regretfully this isn’t a feature offered by X. It could be possible with custom development, but this would be outside the scope of support we can offer. You might want to contact our trusted partners who caters X setup and customization needs. Please see https://community.theme.co/custom-development/.

    Regarding the tooltip, it is not possible out of the box. You can try WPML.

    Thanks for understanding. Take care!

    #1395212
    CEDRIC
    Participant

    OK, I find a solution which is acceptable :

    //BLOC DE PARTAGE EN BAS DE PAGE
    add_filter( 'the_content', 'add_share_button' );
    function add_share_button($content){
      if ( is_singular('post' || 'page') ) {
        $content .= do_shortcode('<div class="x-content-band vc man" style="text-align:center;">
    	<div class="x-container max width wpb_row">
    	[share title="Partager" email="true" facebook="true" twitter="true" linkedin="true" google_plus="true" pinterest="true"]
    			<div class="x-entry-share">
    				<div class="x-share-options"><a href="#share" data-x-element="extra" data-x-params="{&quot;type&quot;:&quot;tooltip&quot;,&quot;trigger&quot;:&quot;hover&quot;,&quot;placement&quot;:&quot;bottom&quot;,&quot;title&quot;:&quot;&quot;,&quot;content&quot;:&quot;&quot;}" class="x-share" title="" onclick="window.print()" data-original-title="Imprimer cette page">[x_icon type="print"]</a>
    			</div>
    		</div>
    	</div>
    ');
    
      }
    
      return $content;
    
    }
    #1395213
    CEDRIC
    Participant

    And for the translation of tooltip?

    #1395622
    Rad
    Moderator

    Hi there,

    They are translatable under cornerstone textdomain. How did you translate your site?

    You’ll have to translate cornerstone plugin too and not just the theme. If you’re using mo/po files, then you can place the translation to /wp-content/languages/plugins/ with format like cornerstone-de_DE.mo or cornerstone-de_DE.po

    Thanks!

    #1396143
    CEDRIC
    Participant

    Thanks it works… but other translation doesn’t work like “Type and press enter to search”.

    It is not a cornerstone translation…
    And my language setting is in french.

    Where I can change it?
    Thanks

    #1396161
    Christian
    Moderator

    It is a part of X.

    <?php _e( 'Type and Press &ldquo;enter&rdquo; to Search', '__x__' ); ?>

    Please see https://community.theme.co/kb/translation/ for X translation instructions.

    Thanks.

    #1396218
    CEDRIC
    Participant

    Marvellous.

    Thanks

    #1396289
    Joao
    Moderator

    You are welcome!

  • <script> jQuery(function($){ $("#no-reply-1393641 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>