Skip to content

Instantly share code, notes, and snippets.

<?php
function the_breadcrumb() {
global $post;
echo '<ul id="breadcrumbs">';
if (!is_home()) {
echo '<li><a href="';
echo get_option('home');
echo '">';
echo 'Home';
echo '</a></li><li class="separator"> / </li>';
.adstyle {
background:#f4f4f4;
width:927px;
height:90px;
text-align:right;
float:right;
border:solid 1px #c7c7c7;
}
function adsense() {
return ‘
<!– Start Here –>
Paste Your Adsense Code Here
<!– End Here –>
‘;
}
add_shortcode(‘adsense’, ‘adsense′);
Redirect 301 /oldpage.html http://www.MyAwesomeWebsite.com/newpage.html
function get_the_user_ip() { if ( ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ) { //check ip from share internet $ip = $_SERVER['HTTP_CLIENT_IP']; } elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) { //to check ip is pass from proxy $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; } else { $ip = $_SERVER['REMOTE_ADDR']; } return apply_filters( 'wpb_get_ip', $ip ); } add_shortcode('show_ip', 'get_the_user_ip');
/*social sharing buttons*/
.social a{
display:inline-block;
margin:10px 10px 5px 0;
padding:10px 15px;
color:#fff;
font-weight:bold;
text-align:center;
text-decoration:none;
border-radius:5px;
<div class="social">
<p>Share this post on:</p>
<!--Twitter-->
<a class="twitter" href="http://twitter.com/home?status=Reading: <?php the_permalink(); ?>" title="Share this post on Twitter!" target="_blank">Twitter</a>
<!--Facebook-->
<a class="facebook" href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&amp;t=<?php the_title(); ?>" title="Share this post on Facebook!" onclick="window.open(this.href); return false;">Facebook</a>
<!--Google Plus-->
<a class="google-plus" target="_blank" href="https://plus.google.com/share?url=<?php the_permalink(); ?>">Google+</a>
</div>
<script src="https://apis.google.com/js/plusone.js">
</script>
<div class="g-comments"
data-href="<?php the_permalink(); ?>"
data-width="800"
data-first_party_property="BLOGGER"
data-view_type="FILTERED_POSTMOD">
</div>
class="?php
/* Only use the authcomment class from style.css if the user_id is 1 (admin) */
if (1 == $comment-user_id)
$oddcomment = "authcomment";
echo $oddcomment; " id="comment"
class="?php echo $oddcomment; ?" id="comment"