Skip to content

Instantly share code, notes, and snippets.

shemul49rmc

Block or report user

Report or block shemul49rmc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@shemul49rmc
shemul49rmc / Facebook Pop up Plugin for Blogger:
Last active Aug 29, 2015
Facebook Pop up Plugin for Blogger
View Facebook Pop up Plugin for Blogger:
<style type='text/css'>
#iamshemulpopup{
position: fixed;
top:100px;
z-index:9999;
display:none;
padding:0px;
right:600px;
border:10px solid rgba(82, 82, 82, 0.7);
-webkit-background-clip: padding-box; /* for Safari */
@shemul49rmc
shemul49rmc / Add Custom Content After All WordPress Posts
Last active Dec 31, 2015
Add Custom Content After All WordPress Posts
View Add Custom Content After All WordPress Posts
/**
* Add Custom Content After All WordPress Posts By http://goo.gl/ht6fZo
*/
function add_after_post_content($content) {
if(!is_feed() &#038;& !is_home() &#038;& is_singular() &#038;& is_main_query()) {
$content .= '<p>YOUR CONTENT AFTER POST</p>';
}
return $content;
}
add_filter('the_content', 'add_after_post_content');
@shemul49rmc
shemul49rmc / Stop Search Engines From Indexing Search Results
Created Dec 13, 2013
Stop Search Engines From Indexing Search Results
View Stop Search Engines From Indexing Search Results
/**
* Stop Search Engines From Indexing Search ResultsBy http://goo.gl/ht6fZo//
*/
<?php if(is_search()) { ?>
<meta name="robots" content="noindex, nofollow" />
<?php }?>
View Remove Stop Words from URL
/**
* Remove Stop Words from URL By http://goo.gl/ht6fZo//
*/
add_filter('sanitize_title', 'remove_stop_words');
function remove_stop_words($slug) {
if (!is_admin()) return $slug;
$slug = explode('-', $slug);
@shemul49rmc
shemul49rmc / Add Missing Alt Tags To WordPress Images
Created Dec 13, 2013
Add Missing Alt Tags To WordPress Images
View Add Missing Alt Tags To WordPress Images
/**
* Add Missing Alt Tags To WordPress Images By http://goo.gl/ht6fZo
*/
function add_alt_tags($content)
{
global $post;
preg_match_all('//', $content, $images);
if(!is_null($images))
{
foreach($images[1] as $index => $value)
@shemul49rmc
shemul49rmc / Show Top Commenters On WordPress Blog
Last active Dec 31, 2015
Show Top Commenters On WordPress Blog
View Show Top Commenters On WordPress Blog
/**
* Show Top Commenters On WordPress Blog By http://goo.gl/ht6fZo
*/
function top_comment_authors($amount = 5) {
global $wpdb;
$results = $wpdb->get_results('
SELECT
COUNT(comment_author_email) AS comments_count, comment_author_email, comment_author, comment_author_url
FROM '.$wpdb->comments.'
WHERE comment_author_email != "" AND comment_type = "" AND comment_approved = 1
@shemul49rmc
shemul49rmc / Add rel=”nofollow” To WordPress Comment Reply Links
Created Dec 13, 2013
Add rel=”nofollow” To WordPress Comment Reply Links
View Add rel=”nofollow” To WordPress Comment Reply Links
@shemul49rmc
shemul49rmc / Minimum Comment Limit In WordPress
Created Dec 13, 2013
Minimum Comment Limit In WordPress
View Minimum Comment Limit In WordPress
//Minimum Comment Limit In WordPress by http://goo.gl/ht6fZo//
add_filter( 'preprocess_comment', 'minimal_comment_length' );
function minimal_comment_length( $commentdata ) {
$minimalCommentLength = 15;
if ( strlen( trim( $commentdata['comment_content'] ) ) < $minimalCommentLength )
{
wp_die( 'All comments must be at least ' . $minimalCommentLength . ' characters long.' );
}
@shemul49rmc
shemul49rmc / Simple Social Follow Widget With CSS Image Sprites
Last active Mar 21, 2017
Simple Social Follow Widget With CSS Image Sprites
View Simple Social Follow Widget With CSS Image Sprites
<style>
/*-----Social Follow-----*/
#follow{
border: 2px solid #ACA3A3;
padding: 5px 5px 5px 0px;
overflow: hidden;
display: inline-block;
}
#follow a{
width:32px;
@shemul49rmc
shemul49rmc / Facebook Comment for Single Posts
Last active Dec 29, 2015
Facebook Comment for Single Posts
View 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 }
}
You can’t perform that action at this time.