Archives

How to Add Social Media Share Count Widgets in WordPress

Grab the Original Widget

Most of the share counts are a piece of JavaScript that you must retrieve from the social media service. This article is also meant to serve as a one stop shop. You can come here to find the location for top social media services because a lot of them makes it really hard to find on their sites. The goal of this article is to avoid using as many plugins as possible, so when you are picking the type choose site: Normal.

  • Digg
  • StumbleUpon
  • Tweetmeme Retweet
  • Facebook Share
  • Facebook Like Button
  • Reddit
  • Njuice Google Buzz
  • Sphinn

Share Count Widgets

Customizing the Codes

Because we chose the code for a Normal Site, we may need to modify it to make it compatible with WordPress. We are also going to be showing just the Compact Share Count Buttons. You can ofcourse use the codes as a guide to get different sizes.

Note: You must paste all of these codes inside a loop, most likely in your single.php file.

Digg

01    <script type=”text/javascript”>
02    (function() {
03    var s = document.createElement(‘SCRIPT’), s1 = document.getElementsByTagName(‘SCRIPT’)[0];
04    s.type = ‘text/javascript’;
05    s.async = true;
06    s.src = ‘http://widgets.digg.com/buttons.js&#8217;;
07    s1.parentNode.insertBefore(s, s1);
08    })();
09    </script>
10
11    <a href=”http://digg.com/submit?url=&lt;?php the_permalink(); ?>”></a>

Normally, you should not have to add the href part of the link area. But if you don’t, and you have paginated comments or posts, then your digg button will not work on all pages. So if the main page was submitted, the second page will show a submit URL allowing users to submit duplicate content to digg.

StumbleUpon

1    <script src=”http://www.stumbleupon.com/hostedbadge.php?s=1&r=&lt;?php the_permalink(); ?>”></script>

Tweetmeme Retweet

1    <script type=”text/javascript”>
2    tweetmeme_source = ‘wpbeginner’; tweetmeme_service = ‘bit.ly’; tweetmeme_style = ‘compact’; tweetmeme_url = ‘<?php the_permalink() ?>’;
3    </script>
4    <script type=”text/javascript” src=”http://tweetmeme.com/i/scripts/button.js”></script&gt;

Make sure that you change the Tweetmeme_source variable to your twitter handle. Right now it is @wpbeginner. So whenever someone clicks it will show RT @wpbeginner Post Title – Link. We are using bit.ly as the link shortening service, you can change it to others that tweetmeme offers, but bit.ly is the best one.

Facebook Share

1    <a name=”fb_share” type=”button_count” share_url=”<?php the_permalink(); ?>” href=”http://www.facebook.com/sharer.php”>Share</a><script src=”http://static.ak.fbcdn.net/connect.php/js/FB.Share&#8221; type=”text/javascript”></script>

Facebook Like Button

Facebook Like Button is a phonemonal tool for traffic. Syed has shown how it has helped in our WordPress Newsletter in the past.

1    <iframe src=”http://www.facebook.com/plugins/like.php?href=&lt;?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>

Reddit

1    <script type=”text/javascript”>
2    reddit_url = “<?php the_permalink(); ?>”;
3    reddit_title = “<?php the_title(); ?>”;
4    </script>
5    <script type=”text/javascript” src=”http://reddit.com/static/button/button1.js”></script&gt;

Njuice Google Buzz Count

Google Buzz do not have an active API that allows to keep track of count. There are a few ways to work around that which gives you some what of a misguided count. But for those users, who want to have a Google Buzz Count, then here is how you can add it.

1    <script type=”text/javascript”>
2    var njuice_buzz_size = ‘small’;
3    var njuice_buzz_title = ‘<?php the_title(); ?>’;
4    var njuice_buzz_url = ‘<?php the_permalink(); ?>’;
5    </script>
6    <script type=”text/javascript” src=”http://button.njuice.com/buzz.js”></script&gt;

Sphinn

1    <script type=”text/javascript”>submit_url = ‘<?php the_permalink(); ?>’;</script>
2    <script type=”text/javascript” src=”http://sphinn.com/evb/buttons.php?b=small”></script&gt;

That is all the customizing we need to make each of these widgets work with WordPress perfectly. Now, you may have to customize the styling for it to work with your theme design. You are better of putting these codes above <?php the_content(); ?> code. You can also use our Smart Sharing Plugin, to display a floating icon down your window.

Source : wpbeginner.com

Advertisements

SEO Excel Functions

SEO and Excel are like chocolate and peanut butter – great together. Here are some Excel functions (and two formulas) that can make SEO just a little bit easier.

LEN

Character Length in Excel

The LEN function returns the number of characters in a cell. It’s particularly handy in creating the right title and meta descriptions. Remember to keep your titles to ~60 characters and meta descriptions to ~150 characters.

TRIM

Phantom spaces at the beginning or end of a cell can be maddening. So before you go Office Space on your keyboard use the TRIM function which gets rid of any spaces before or after text. It’ll also get rid of any extra spaces between words. Think of TRIM as a vacuum cleaner for spaces.

SUBSTITUTE

This is just what it sounds like. Using the SUBSTITUTE function you can find specific text and substitute it for different text. It doesn’t sound all that interesting but it turns out to be vital in creating useful formulas.

Word Count Formula

There’s no out of the box word count function. But with a little creativity you can create a useful word count formula using the three functions above.

=LEN(TRIM(A1))-LEN(SUBSTITUTE(A1," ",""))+1

The first part of the formula returns the number of characters in the keyword phrase. We’re using TRIM to ensure extra spaces aren’t included in the LEN calculation.

The second part of the formula returns the number of characters in the keyword phrase without spaces. We’re using SUBSTITUTE to remove the spaces.

The difference between the two numbers tells you the total number of spaces in the keyword phrase. That’s where the +1 comes in. If there are three spaces, that means you actually have four words. Confused? Here’s an example.

This is three spaces

There’s a space between This and is, between is and three and between three and spaces. The number of words will always be one more than the number of spaces.

INT

The INT function is excellent if you’re downloading the new Google Webmaster Tools Top Queries report. You might see that your average position is sometimes not a whole number. This level of detail can be useful, but sometimes you want to aggregate. That’s where INT comes in. The INT function will return just the integer from that number.

You can actually do this in a number of ways including ROUND, ROUNDDOWN and ROUNDUP. If you use any of the ROUND functions you’ll simply specific that the number of digits you want to round to is 0. Here’s a look at how each one behaves in a real world example.

Rounding Numbers In Excel

Once you have your whole number rank you can use a number of methods to analyze it, my favorite being a pivot table.

Know More about SEO Excel Functions…..

Untypical WordPress Sites

I think most of you should know that WordPress can do more than just a blog platform. With WordPress, plus some plugins, you can build almost any type of websites. To show you what I mean, I have collected 30 websites that use WordPress for different purposes — from general websites to portfolios, ecommerce and corporate sites.

FlickOut

screenshot

Eight Hour Day

screenshot

Alpha Multimedia

screenshot

Baney Design

screenshot

ES Developed

screenshot

See More….