Skip to content

Instantly share code, notes, and snippets.

@srikat
Last active December 26, 2015 20:39
Show Gist options
  • Save srikat/7210288 to your computer and use it in GitHub Desktop.
Save srikat/7210288 to your computer and use it in GitHub Desktop.
genesis_register_sidebar( array(
'id' => 'after-entry',
'name' => __( 'After Entry', 'metro' ),
'description' => __( 'This is the after entry section.', 'metro' ),
) );
//* Hooks after-entry widget area to single posts
add_action( 'genesis_entry_footer', 'metro_after_post' );
function metro_after_post() {
if ( ! is_singular( 'post' ) )
return;
genesis_widget_area( 'after-entry', array(
'before' => '<div class="after-entry widget-area"><div class="wrap">',
'after' => '</div></div>',
) );
}
<div class="after-post-social">
<p class="after-post-social-title">Additionally you can follow us via:</p>
<div class="after-post-social-facebook after-post-social-btn">
<!-- Facebook follow code here -->
</div>
<div class="after-post-social-gplus after-post-social-btn">
<!-- Google+ follow code here -->
</div>
<div class="after-post-social-twitter after-post-social-btn">
<a href="https://twitter.com/srikat" class="twitter-follow-button" data-show-count="false" data-size="large">Follow @srikat</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
</div>
<div class="after-post-social-rss after-post-social-btn">
<a href="http://sridharkatakam.com/feed/">
<img class="alignnone size-full wp-image-19514" alt="rss-icon" src="http://example.dev/wp-content/uploads/2013/10/rss-subscribe.png" />
</a>
</div>
</div>
<div class="after-post-social">
<p class="after-post-social-title">Additionally you can follow us via:</p>
<div class="after-post-social-facebook after-post-social-btn">
<iframe src="//www.facebook.com/plugins/follow.php?href=https%3A%2F%2Fwww.facebook.com%2Fsridhar.katakam&amp;width=190&amp;height=42&amp;colorscheme=light&amp;layout=standard&amp;show_faces=false&amp;appId=380825228697500" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:190px; height:42px;" allowTransparency="true"></iframe>
</div>
<div class="after-post-social-gplus after-post-social-btn">
<!-- Place this tag where you want the widget to render. -->
<div class="g-follow" data-annotation="bubble" data-height="24" data-href="//plus.google.com/107780594838940170775" data-rel="author"></div>
<!-- Place this tag after the last widget tag. -->
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</div>
<div class="after-post-social-twitter after-post-social-btn">
<a href="https://twitter.com/srikat" class="twitter-follow-button" data-show-count="false" data-size="large">Follow @srikat</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
</div>
<div class="after-post-social-rss after-post-social-btn">
<a href="http://sridharkatakam.com/feed/">
<img class="alignnone size-full wp-image-19514" alt="rss-icon" src="http://example.dev/wp-content/uploads/2013/10/rss-subscribe.png" />
</a>
</div>
</div>
/* Social sharing buttons below single posts */
.after-post-social {
display: table;
margin: 0 auto;
}
.after-post-social-title {
text-align: center;
font-weight: bold;
}
.after-post-social-btn {
float: left;
margin-right: 0.9rem;
}
.after-post-social-btn:last-child {
margin-right: 0;
}
@media only screen and (max-width: 1139px) {
.after-post-social-twitter {
clear: both;
}
}
@media only screen and (max-width: 1024px) {
.after-post-social-btn {
margin-right: 0;
float: none;
margin-bottom: 0.5em;
}
.after-post-social-btn:last-child {
margin-bottom: 0;
}
}
@media only screen and (max-width: 480px) {
.after-post-social-btn {
margin-bottom: 0.5em;
float: none;
}
.after-post-social-btn:last-child {
margin-bottom: 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment