Category Archives: Tools

Time Saving WordPress Shortcode Tricks

One of my favorite features of WordPress is the shortcode trick.  The name says it all, but for those not familiar yet with the magic of shortcodes, they allow you to insert a particular function automatically into a WordPress page or post.  This function can be virtually anything.  From inserting recent posts to displaying a widget to affecting formatting, shortcodes can do it all.  Most premium themes are coming bundled with some shortcodes and it is quickly becoming the hallmark of a quality theme, at least those that are sold in marketplaces like ThemeForest.

From a functional standpoint, shortcodes are located in the theme files or plugin files.  When a particular shortcode is used in the post or page content, it references a longer snippet of code that creates the desired function.  So rather than trying to insert raw PHP into post content, I could write [myshortcode] and it would insert whatever longer snippet is referenced by that shortcode.  Nifty huh?

shortcodesIf you don’t have shortcodes but would like to play around with them, consider the Elegant Shortcodes plugin from Elegant Themes.  It is a standard WordPress plugin that adds the functionality of shortcodes that come with all of Elegant Themes premium themes.  They include buttons, info boxes, toggle boxes, tabs, a slideshow, an image slider, password protected content, columns, social media buttons, tooltips, tables, dropcaps, quotes and more.  Really anything you could need to spice up your site.

But enough about that one plugin.  Because I’ve found shortcodes so useful since they were introduced in version 2.5 that I thought I would push the limits of what they can do and look for some tips, tricks and hacks that extend their usefulness even further.  Disclaimer: I haven’t tried all of these in a live WordPress installation.  As always, backup your site before messing with it.

 1. Add shortcodes to theme files

Shortcodes are so easy to insert in posts and pages.  But what if you want to modify your theme and add a shortcode to it?  I’ve wanted to do this when I’ve wanted shortcode results to be displayed in a sidebar or somewhere else outside of the content area.  Adding a shortcode to the theme is simple.  Just insert this code, obviously replacing [shortcode] with your shortcode name.

<?php echo do_shortcode("[shortcode]"); ?>

Want to use a shortcode within the loop?  Try this:

echo do_shortcode('[shortcode]');

2. The “bloginfo” shortcode

The bloginfo function can display all sorts of handy information about your site which could save you time.  In order to use this function, you can built a very quick shortcode by inserting the following code into your functions.php file.  Thanks to CSS-Tricks for this one.

function digwp_bloginfo_shortcode( $atts ) {
   extract(shortcode_atts(array(
       'key' => '',
   ), $atts));
   return get_bloginfo($key);
}
add_shortcode('bloginfo', 'digwp_bloginfo_shortcode');

Then you use a shortcode with a parameter to tell the function which data you are looking to display.  Like this:

[bloginfo key='name']

You can also use a shortcode in HTML which can prevent you from having to write long URL’s over and over.  Like this:

<img src="[bloginfo key='template_url']/images/logo.png" alt="[bloginfo key='name'] logo" />

See the full list of info you can grab here, but you can choose from some of these beauties: name, description, wpurl, admin_emai and rss_url.

Note: make sure to switch to the HTML editor when adding a shortcode.  The WordPress WYSIWYG will strip the brackets from your shortcode if you enter them in the visual editor.

3. Allow shortcodes to be used in widget text

If you’re not into coding shortcodes directly into your theme files, but want them in your widget text, you can use this code to add a filter to the widget_text() function which overrides WordPress’ tendency to disallow shortcodes in widget text.

add_filter('widget_text', 'do_shortcode');

What is your favorite technique, trick or tip when working with shortcodes?  How have you used them to make your life easier?  Let us know in the comments below.

Latest Alternatives to Google: David, Meet Goliath

There is no question that Google is the goliath of search, bigger and more powerful than any other search engine.  But with 70% of the lucrative search engine market share, there is bound to be constant challengers to their position.  Google usually buys out any serious competitor before they can become a threat, but that doesn’t stop some very smart people from trying to build the next Google.

Whether interested in the financial prospects, ethical interests, or because they like the challenge, new search engines are popping up everywhere.  Here are a few of the latest and coolest search innovations.

My personal favorite, DuckDuckGo takes privacy very seriously.  They don’t track your searches or click behavior.  They also produce a mighty fine search result and have tons of nifty features and add-ons.

blekko

Blekko has the biggest push behind it since Bing.  Although they produce a nice search result, I think anyone could with $25 Million in venture capital behind them.  They use hashtags to help searchers sort through notoriously spammy results like “online degrees”.

twitter search

Despite my longstanding opposition to everything Twitter (read: I don’t care what you just ate for lunch), Twitter is being used as a new search tool.  Their user base has reached the size that it can actually provide a somewhat accurate, real-time presentation of what’s happening.

wolfram alpha

Wolfram|Alpha is about as real as it gets.  There’s no flip-flop spam here, just detailed facts.  You pay a price for those facts, but cutting out probably 99.99% of the searchable web.  If you’re looking for many obscure results, try one of the above searches.  If you need encyclopedic results, go with Wolfram, if you can remember the name.

Did you like this post?  Then consider liking us on Facebook!

Essential WordPress Social Media Tools

Converting users is as important as ever before. With millions of websites being created every day, how can you compete? Here’s how: convert your readers like a pro with these essential tools.

Meebo Toolbar

Meebo Toolbar for WordPressA sweet little bar that hangs out at the bottom of all your pages. It is available as a WordPress plugin or standalone code. You can customize the bar with anything you might need to convert users like RSS links, and integration with your Facebook page.

Wibiya Toolbar
Wibiya Toolbar for WordPressAnother handy toolbar with some different content and style options. Both tools can help convert users, it’s up to you to decide which one is best for you.

WP Greet Box

WP greetbox plugin for WordPress This handy plugin will insert a discrete box below the heading but above the content with dynamically generated message to readers based on their referral source. See it in action here: 43 Ways to Promote your content like a pro.

Smart Sharing Plugin

Easy Share Plugin for WordPressThis plugin creates a box that can be aligned to the left or right of your site with important sharing links.  It scrolls with the user, meaning they are always reminded to switch from “casual visitor” to “avid follower”.

Page.ly makes WordPress a snap

In this previous post, we talked about ways to install WordPress.  All of them have been eclipsed by this new service in terms of ease and speed.  Our friends over at Page.ly take the full WordPress install and cram it into 2 minutes.  Watch the video here.

You’ll pay for the service, but not more than a standard hosting package @ $14.95/month plus a free domain.  Check them out here!

They offer “power ups” which are discounted WordPress-related services and products like those from Woothemes.  Plus, Page.ly sites support all standard themes and plugins.  Plus, a number of themes are pre-installed so you can access them within minutes.  They said it best: “Easy like WordPress.com with the Freedom of WordPress.org”

Heard enough? Check them out here!

Or check out our full: WordPress Hosting Guide.

7 alternatives to Google Analytics

We all use Google Analytics to track visitors to our WordPress sites.  Right?  Not necessarily.  There were several services before Analytics was the standard, and even more have popped up in recent years that compete with the big G!  Here are some of the best options out there, with a little analysis of our own.

But first, some critique of Google Analytics which has caused some webmasters to look elsewhere.

  • Delay.  Have you ever found yourself checking your stats at 12:01 AM?
  • Reliability. Analytics isn’t supposed to count bots and spiders, but have you ever found a massive spike in traffic with no real explanation?  Or perhaps you’ve wondered how a search term of “green chili recipes” brought someone to your blog about rugby?
  • Ease of use.  There are some very powerful features built into Analytics, but for 90% of webmasters, they’re overboard.  Sometimes I just want a simple, stylish graph of traffic.

Here are several alternatives to Analytics that address some of these issues.

Woopra

  • Real Time
  • Easily compare and manage multiple sites
  • Tons of trackable information
  • Promises additional features soon

Clicky

  • Real time statistics
  • Free and paid plans
  • Most of the popular features of Analytics
  • A graphically pleasing layout
  • Offers a WordPress Plugin to integrate with your site.
  • Has an impressive client list including Mashable, SmashingMagazine and BuySellAds.com

Piwik

  • Real Time
  • Simple
  • Open Source
  • Plugin powered so you can add/remove features
  • Installed on your server so you have complete control and ownership of the data

Sitemeter

  • One of the originals
  • Free and paid plans
  • Easy and fast to set up
  • Easily share your stats (or secure them from) visitors

Chartbeat

  • Real time
  • Simple interface
  • Traffic alerts
  • $9.95/month at press time

Reinvigorate

  • Real time
  • Event tracking
  • “Heat map” technology
  • Desktop integration

Mint

mint-analytics

  • Self-hosted for full control
  • Search support
  • Feed subscription patterns
  • $30 per domain – One off

Do you know of another alternative to Google Analytics?  Share it below with your comment.

Wibiya has opened its doors to WordPress users

We recently reported on Wibiya, an exceptional tool for WordPress blogs (and other sites but we don’t care about them).  At the time, Wibiya was in beta mode, asking you to request an invitation to use the plugin.  Just recently, Wibiya took two pretty big steps.

First, Wibiya is now open to the public.  Simply click “Get it now!” to sign up.  You will select a few settings like applications to include on your toolbar, then download a plugin zip file.  Previously you were given a raw PHP file that required manual upload (instead of the handy “upload new plugin” option in your WordPress Dashboard.

Second, Wibiya updated the toolbar altogether.  If you already had the Wibiya toolbar, you need to reinstall it.  The toolbar now includes a couple more applications and a better interface for adding/removing them.

So what does the Wibiya toolbar do?

  • Integrates Facebook into your blog
  • Integrates Twitter, allowing users to tweet about you right from your blog!
  • Offers easy navigation of random and previous/next posts – increasing pageviews and retaining visitors.
  • Lets readers chat with other visitors
  • Lets you communicate with visitors by setting up announcements (popup or not)
  • Decrease reasons for visitors to leave by allowing social networking right on your site (instead of leaving to do so)
  • And tons more applications (translations, real time users and more added all the time)

Like we said, we don’t care about anything that doesn’t involve WordPress, but Wibiya also works with Blogger, Drupal, Ning, Joomla and more.  Check out the new Wibiya toolbar here.

10 Must Have WordPress Plugins

We have built a ton of WordPress sites. Seriously, hundreds. Maybe thousands. Over time, we have developed a short list of go-to plugins. No matter what kind of WordPress site we’re making (a blog, a community, etc.) we start by downloading the latest version of these plugins. In our humble opinion, their features should be built into the WordPress Core.

Here is our list of must-have WordPress plugins:

  1. Alex King’s 404 Notifier. Ever wonder how many visitors are lost to a 404 page?  Let’s face it, your site URL’s change from time to time, and people incorrectly link to you.  Have the chance to fix that by being notified when a 404 error is received.
  2. Fix Database Plugin. Database errors happen, and they slow down your website’s load time.  This plugin identifies errors and attempts to fix them.
  3. Auto-Hyperlink URLs. This can be a real time saver.  This plugin automatically generates hyperlinks of the URL’s you place in posts.
  4. Google (XML) Sitemaps. What good is your exceptionally informative blog if nobody finds it?  Step one to SEO is making sure the search engines are indexing your content regularly.  Just make sure your robots.txt file is updated accordingly, this plugin does not address this.
  5. Sexy Bookmarks. This is the same plugin we use below our posts. (And they happen to be using the same theme as us).  Super easy to setup with a handy AJAX settings page.
  6. Advanced Exerpt. This is the simplest way to modify what the “get_the_excerpt” template tag generates.  You can change word count and even what html tags are dropped from the excerpt.
  7. Contact Form 7. The most versatile and easy to setup contact form plugin.  It’s a little tricky to figure out the first few times, but once that time has passed, it is super easy to use.
  8. Akismet. Comes pre-installed in WordPress – but you have to set it up before it works.  Saves loads of time by auto-identifying SPAM comments.
  9. Twitter Tools.  The easiest (and most comprehensive) way to integrate your Twitter account and your WordPress blog.
  10. Wibiya.  Read this post about why we love the Wibiya plugin/toolbar.