Skip to content

Instantly share code, notes, and snippets.

@shemul49rmc
shemul49rmc / Facebook Comment for Single Posts
Last active December 29, 2015 10:38
Facebook Comment for Single Posts
/*** Facebook Comment for Single Posts ***/
add_action('genesis_before_comments', 'facebook_comments');
function facebook_comments() {
if (is_single()) { ?>
<div class="fb-comments" data-href="<?php the_permalink(); ?>" data-num-posts="3" data-width="600"></div>
<?php }
}
@shemul49rmc
shemul49rmc / Add Facebook Comments on Genesis
Last active December 29, 2015 10:29
Add Facebook Comments on Genesis
<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_US/all.js#xfbml=1&appId=226986334093131";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
@shemul49rmc
shemul49rmc / CSS Slide Rollover Animation Social Links
Last active December 29, 2015 01:49
CSS Slide Rollover Animation Social Links
@shemul49rmc
shemul49rmc / CSS Slide Rollover Animation
Created November 22, 2013 06:55
CSS Slide Rollover Animation
.social-slide {
height: 48px;
width: 48px;
margin: 10px;
float: left;
-webkit-transition: all ease 0.3s;
-moz-transition: all ease 0.3s;
-o-transition: all ease 0.3s;
-ms-transition: all ease 0.3s;
transition: all ease 0.3s;
@shemul49rmc
shemul49rmc / Flat Metro Style Social Share Buttons
Last active December 28, 2015 23:49
Flat Metro Style Social Share Buttons
/*social sharing buttons by http://iamshemul.com/?p=2514 Keep it for update*/
.social a{
width: 120px;
display: block;
padding: 5px;
margin: 5px;
float: left;
font-size: 18px;
text-align: center;
text-decoration: none;
@shemul49rmc
shemul49rmc / Change Comment is Awaiting Moderation Text
Created November 4, 2013 16:45
Change Comment is Awaiting Moderation Text
//Change Comment is Awaiting Moderation Text*http://goo.gl/BdY3R1//
add_filter( 'genesis_comment_awaiting_moderation', 'change_genesis_comment_awaiting_moderation' );
function change_genesis_comment_awaiting_moderation() {
return 'Thanks for the Comment. It is waiting for approval. Meanwhile visit the other section.';
}
@shemul49rmc
shemul49rmc / Fast Loading Colorful Social Share Buttons
Created November 2, 2013 14:00
Fast Loading Colorful Social Share Buttons
/*social sharing buttons by http://goo.gl/qL28jk Keep it for update*/
.social a{
display:inline-block;
margin:1px 2px 5px 0;
padding:3px 3px;
color:#fff;
text-align:center;
text-decoration:none;
border-radius:5px;
-moz-border-radius:5px;
@shemul49rmc
shemul49rmc / Add Facebook and Twitter with Share Counts
Created November 2, 2013 13:56
Add Facebook and Twitter with Share Counts
<div>
<iframe allowtransparency="true" frameborder="0" scrolling="no"
src="https://platform.twitter.com/widgets/tweet_button.html"
style="width:130px; height:20px;"></iframe>
</div>
<?php
echo '<iframe src="http://www.facebook.com/widgets/like.php?href=';
echo the_permalink();
echo ' "scrolling="yes" frameborder="0" style="border:none; width:450px;height:70px"></iframe>'
?>
@shemul49rmc
shemul49rmc / Add Facebook “Like” Button To Each Post In Thesis Without Plugin
Created November 1, 2013 19:10
Add Facebook “Like” Button To Each Post In Thesis Without Plugin
function fb_like() {
if (is_single()) { ?>
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:60px;"></iframe>
<?php }
}
add_action('thesis_hook_after_post','fb_like');
@shemul49rmc
shemul49rmc / Google +1 Button script
Created October 31, 2013 17:34
Google +1 Button script
Search for </head>
Add below code just above it:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
If you had added jquery previously, then you dont need it. View the page source and find for "jquery/1.7.2/"
Step 2 : Add Google +1 Button script