Tagged: x
-
AuthorPosts
-
February 1, 2017 at 6:35 am #1353572
miribetancourtParticipantHi Themeco,
I would like to integrate a facebook-like-button and the opportunity to like at the bottom of the blogposts. Am I correct that you do not provide for that?
Thus, I looked for a different solution and found Storeya. Therefore, I have to integrate code in front of the </body>-tag. Where and how can I do that? Or is there a better solution than Storeya?
Webseite: http://www.kraeuterpracht.de
WordPress 4.7.2
Renew
Cornerstore 1.3.3Thanks, Miriam
February 1, 2017 at 7:16 am #1353619
ThaiModeratorHi Miriam,
Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please add following PHP code below into functions.php locates in child theme’s folder:
add_action( 'x_before_site_begin', 'print_script_before_site_begin' ); function print_script_before_site_begin(){ ?> <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.8&appId=490866727757684"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <?php } add_action( 'x_after_the_content_end', 'add_to_single_posts' ); function add_to_single_posts() { ?> <div class="fb-like" data-href="<?php the_permalink(); ?>" data-layout="standard" data-action="like" data-size="small" data-show-faces="true" data-share="false"></div> <?php }Hope it helps.
February 2, 2017 at 7:30 am #1355167
miribetancourtParticipantHi Thai,
thanks for the effort. I will give it a try.
MiriamFebruary 2, 2017 at 10:03 am #1355371
RupokMemberGreat. Let us know how it goes.
Cheers!
February 6, 2017 at 3:47 am #1359389
miribetancourtParticipantHi,
in the folder it shows:
<?php
// =============================================================================
// FUNCTIONS.PHP
// —————————————————————————–
// Overwrite or add your own custom functions to X in this file.
// =============================================================================// =============================================================================
// TABLE OF CONTENTS
// —————————————————————————–
// 01. Enqueue Parent Stylesheet
// 02. Additional Functions
// =============================================================================// Enqueue Parent Stylesheet
// =============================================================================add_filter( ‘x_enqueue_parent_stylesheet’, ‘__return_true’ );
// Additional Functions
// =============================================================================Where exactly do I have to poste the PHP code?
Thanks for your help. Cheers
February 6, 2017 at 4:09 am #1359406
ChristianModeratorBelow
// Additional Functions // ============================================================================= -
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1353572 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
