The top tutorials, how-tos, tips, tricks, and hacks that enable your WordPress-powered blog or site to work the way you need it.
All the latest (and greatest) Tutorials tutorials, hacks, news, plugins, and themes collected from all the Unleashed Gurus' websites and blogs and assembled here for your easy access. Use the toolbar above to filter the tutorials, hacks, news, plugins, and themes to a particular creative application, or to view all subjects simultaneously.

Have you ever searched for a way to make a WordPress.com blog more robust? How about a way to make a WordPress hosted blog or site more secure and simpler to set up and maintain?A few WordPress superstars have teamed up to create WPEngine, a new and very exciting platform that promises to do all of the above and more.WordPress has become the killer platform for many bloggers, small businesses and developers/consultants with multiple clients.However, there’s a middle ground between a WordPress.com blog and a hosted WordPress site that a few apps are attempting to cover. This middle ground includes people who don’t have the technical skills of a WordPress developer or even a website administrator but who still want to take advantage of a greater part of the WordPress ecosystem of plugins and other benefits.About the ProductWPEngine offers a WordPress VIP-type experience for smaller-scale websites, and it includes top-notch…

A couple of weeks ago Pawan from MaxBlogPress.com contacted me, saying he had developed a new plugin that would significantly boost the number of sign-ups I was getting to my email newsletter.
I have known Pawan for a while, and I use many of his plugins, so I said “Sure.” He sent me the files, and I installed it on Daily Blog Tips. The plugin is called Subscribers Magnet, and the idea is to create multiple “hit” points (i.e., methods and places your visitors can use to sign-up) to increase the number of new email subscribers you get per day.
The idea sounded cool, but only when I started playing with the plugin I realized it was a really neat piece of software, and here is why.
First of all it integrates with most email marketing applications (e.g., Aweber, iContact, ConstantContact), so getting the plugin to work is straight forward.…
As usual, let’s start by pasting the function in your functions.php file:
function get_category_id($cat_name){
$term = get_term_by(‘name’, $cat_name, ‘category’);
return $term->term_id;
}
Once you saved the file, just call the function with your category name as a parameter. Example:
$category_ID = get_category_id(‘WordPress Tutorials’);
Looking for WordPress hosting? Try WP Web Host. Prices starts at $5/month and you can try it for free!WordPress function: Get category ID using category name

As a follow up to Jonathan Bailey’s great post yesterday, Blogging Pitfalls: Becoming a Spammer, I wanted to talk about comment spam a bit more. Bloggers are often inundated with comment spam, which can get so bad that they might even reconsider moderating comments.
Unfortunately, there are some forms of comment spam that have gotten out of control over the past year or so, and bloggers need to be aware of these spam tactics, try to identify them, and mark those comments as spam using their comment spam detection tool (for example, Akismet). Identifying comments as spam helps your spam tool better identify them in the future, so hopefully, they won’t get through to your moderation queue anymore.
But how do you know if a comment is spam if it’s not the usual link-filled or gibberish spam comment that can be identified with a cursory glance? That’s the problem with…
We have been working diligently on updating Digging into WordPress and finding the best print-on-demand solution. Thanks to your suggestions and ideas for book printing, there were many options to check out. After sizing things up, we’re pleased to announce the following:
Digging into WordPress version 3.0 will be released near the end of August
Printed editions of DiW will be available in September
We’re still working out the specifics regarding cost, shipping, and so forth, but the book will be updated soon and printed books are back on the menu. So that’s the plan at this point – no hard promises but rather strong goals for DiW v3.0.
As always, stay tuned for more news!
Like the article? Get the book!
© 2010 Digging into WordPress | Permalink | 2 comments | Add to
Delicious
Categorized: Site News | Tagged: book, printing

This post originally appeared on the American Express OPEN Forum, where Mashable regularly contributes articles about leveraging social media and technology in small business.A website without multimedia is like a cupcake without icing: Functional but lacking. These days, all manner of web pages from huge company sites to small business blogs are expected to add audio, photo, or video to their posts and homepages.While this all sounds well and good for multimedia companies that produce endless amounts of content, small businesses with text-based websites can run into trouble finding and providing appropriate content. The real trick is adding multimedia that enriches your site, product, or brand without taking away from your company’s core message and aesthetic. And how do you get a rich multimedia experience without hiring a coder?This is rarely easy. To help, we’ve collected some simple resources to add audio, photo or video to your blog. The BasicsFor…

How to Build a Successful Blog Business is a straight forward guide to building a publishing business online that covers everything from choosing a niche to hiring staff, registering a business to selling it, finding traffic to monetizing it.
Collis is a web veteran with a wealth of experience and an easy to read style. He has founded sites such as the Tuts+ network, the Envato Marketplaces, FreelanceSwitch and AppStorm which combined serve up over 50 million pageviews a month.
In How to Build a Successful Blog Business Collis shares tips from his years of operating kick ass blogs, and reveals stats, graphs, revenue figures and inside details from three real world case studies.
Nowhere else will you be able to find information like this. Step behind the scenes of Envato’s wildly successful sites and find out how you build blogs that are both profitable and popular. This is the…

A comprehensive WordPress installation, albeit simple to produce, often requires multiple steps — many of which can easily be omitted accidentally. How many times have you forgotten to customize your permalink structure? How about adding in a sitemap plugin? What about changing your timezone? If you’ve installed WordPress more than once, chances are you’ve missed something. Take the following steps and you’ll never miss anything again.
Step 1: Get WordPress from SVN
The number one mistake for a flexible WordPress installation happens right from the get-go. I’ve seen numerous developers manually download, unzip, and upload WordPress to their site. This is not only a waste of time, but it also reduces flexibility.
If you download WordPress from SVN, all you need to do is run the following in command-line:
svn co http://core.svn.wordpress.org/tags/3.0 .
Maybe you want the latest developer version. That’s even simpler:
svn co http://core.svn.wordpress.org/trunk/ .
Why is this…

Here at Digging Into WordPress, we’ve attached thumbnail images to every single (non-link-style) post since day one. We started before WordPress 3.0 had the specific feature for thumbnails. We did it just by attaching a file path to the thumbnail image as a custom field. We clearly display each of those thumbnails in the design of the homepage and other various pages where it makes sense.
The biggest reason we decided to attach post thumbnails from the beginning was that it is just an interesting bit of data to have available for every single post. It means that we could do something like display random thumbnails in the sidebar, or display thumbnails next to search results. We don’t do either of those things in this current design, but it’s always a possibility and possibilities are awesome.
Another thing that is a cool thing to build with thumbnails is unique archive…

Brian Casel is a web designer and owner of ThemeJam WordPress Themes and CasJam Media. You can follow Brian on his blog at BrianCasel.com or on Twitter @CasJam.It’s no secret that web design is a fast-growing industry. Virtually every type of business is in need of a quality website. There are opportunities at the large agency level down to freelancers developing small-business websites from home.So how do you break into this exciting field? With little or no experience creating websites, getting yourself up to speed can be a daunting task. There are so many different avenues of design and development to explore. Which way should you go first? Which skill sets suit you the best?We aim to give you an overview of a few things things that are essential to a well-rounded knowledge of web design. These are starting-points, if you will. Below each item, we’ve listed additional resources for…
As usual, the first thing to do is to paste the function in your functions.php file:
function get_average_readers($feed_id,$interval = 7){
$today = date('Y-m-d', strtotime("now"));
$ago = date('Y-m-d', strtotime("-".$interval." days"));
$feed_url="https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=".$feed_id."&dates=".$ago.",".$today;
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $feed_url);
$data = curl_exec($ch);
curl_close($ch);
$xml = new SimpleXMLElement($data);
$fb = $xml->feed->entry['circulation'];
$nb = 0;
foreach($xml->feed->children() as $circ){
$nb += $circ['circulation'];
}
return round($nb/$interval);
}
Once done, you can call the function wherever you want in your theme files. Pass your Feedburner feed id as a parameter:
<?php
$nb = get_average_readers('catswhocode');
echo "I have ".$nb." RSS readers";
?>
Code initially published on Cats Who Blog.
Looking for WordPress hosting? Try WP Web Host. Prices starts at $5/month and you can try it for free!How to display your average feed readers

Chalk this one up as a victory for the free software movement: Thesis, the wildly popular proprietary WordPress theme from developer/designer Chris Pearson, is now available under a split GPL, the license that makes it possible to alter and redistribute this software as you see fit.Pearson’s decision marks the end of a high-drama clash between him and Matt Mullenweg, the founder of WordPress and of Automattic, which runs WordPress.com and a handful of related software. Some folks wondered if the battle of words might end in a battle of legal precedent as Mullenweg struggled to preserve free software principles and Pearson struggled to maintain control over his highly successful software.Thesis caused a bit of a ruckus when it was first released a couple years ago; being built on WordPress and using the WordPress plugin API (GPL software), the theme was supposedly subject to the same share-and-share-alike principles and should have…
About a month ago I posted about how fast WordPress 3.0 was being downloaded and there was a terrific discussion about the sheer amount of data that was being grabbed to get at the 3.0 version of WordPress. We even had some comments as to why it was being downloaded at that scale.
Well as of today the download counter reads that it has been downloaded just over 10.3 million times since it was released last month and the counter keeps rolling along!
So what is it that makes the WordPress platform so popular? What is it that drives people to download it over 10 million times?
If you had the opportunity to talk to a non WordPress user what would you tell them about it to show that it is worth downloading and putting to use for a website?
What is your favorite thing about WordPress? What is your…
![[ Screenshot: WP Permalink Settings ] [ Screenshot: WP Permalink Settings ]](http://digwp.com/wp-content/blog-images/optimize-permalinks-setting.gif)
Configuring your WordPress permalinks is simple and only takes a second, but understanding what they are and how they work is key to setting up the best permalink structure possible. Your site’s permalinks are like the street address for your site’s web pages. They help both people and robots understand your site’s structure and navigate its contents. There is no “one magic permalink recipe to rule them all,” but keeping a few tips in mind makes it easy to optimize your WordPress permalinks. This DiW article shows you how..
WordPress makes it so easy
WordPress gives you full control over your permalinks. First, you have control over the general structure of your permalinks. Navigate to Settings > Permalinks and you will see several options for configuring your permalinks:
This is where you configure the general structure of your permalinks, as seen here with green underline. The portion underlined in red…

Custom fields in WordPress make it easy to customize your theme in a variety of ways; plus, they are simple to implement for posts and pages. Attachments, on the other hand, take a bit more work to implement, requiring you to read through and decipher core source code in order to make them work. We’ll be walking through the use of a couple undocumented WordPress hooks in this tutorial to make this process much easier.
Preface: About The Hooks
Both these hooks have been around since WordPress 2.5, and are applied in wp-admin/includes/media.php, but remain underused in the community most likely because they’re undocumented in the Codex. Below is where the hooks are applied in the core code, letting us know what will be passed to the functions we add to each hook.
attachment_fields_to_edit
function get_attachment_fields_to_edit($post, $errors = null) {
// …
$form_fields = apply_filters(“attachment_fields_to_edit”, $form_fields, $post);
// …
}…

Cyrus Patten is the editor of Pingable.org, a blog about everything WordPress. He specializes in the role of technology in community organizing.WordPress is inherently fast, and that’s why so many professional bloggers call it their choice platform.Like many new bloggers, I used to think that until I had enough traffic to make a difference, I’d worry about the bandwidth and site speed later. But that’s not thinking ahead considering that today social media can drive an overwhelming amount of traffic in a very short period of time; you don’t want to get caught with a crashed site.When you’re not prepared for lots of traffic, it’s common for a web host to suspend your account temporarily, and that’s something you don’t want. If your writing is decent and you’ve been doing some minimal promotion, then it could happen to you. Think positively and prepare your blog as though it’s going to…
Highlight specific words in a phraseSometimes, for example, when displaying search results, it is a great idea to highlight specific words. This is exactly what the following function can do:function highlight($sString, $aWords) {
if (!is_array ($aWords) || empty ($aWords) || !is_string ($sString)) {
return false;
}
$sWords = implode (‘|’, $aWords);
return preg_replace (‘@\b(‘.$sWords.’)\b@si’, ‘<strong style=”background-color:yellow”>$1</strong>’, $sString);
}Source: http://www.phpsnippets.info/highlights-words-in-a-phraseGet your average Feedburner subscribersRecently, Feedburner counts had lots of problems and it’s hard to say that the provided info is still relevant. This code will grab your subscriber count from the last 7 days and will return the average.function get_average_readers($feed_id,$interval = 7){
$today = date(‘Y-m-d’, strtotime(“now”));
$ago = date(‘Y-m-d’, strtotime(“-”.$interval.” days”));
$feed_url=”https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=”.$feed_id.”&dates=”.$ago.”,”.$today;
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $feed_url);
$data = curl_exec($ch);
curl_close($ch);
$xml = new SimpleXMLElement($data);
$fb = $xml->feed->entry['circulation'];
$nb = 0;
foreach($xml->feed->children() as $circ){
$nb += $circ['circulation'];
}
return round($nb/$interval);
}Source: http://www.catswhoblog.com/how-to-get-a-more-relevant-feedburner-countAutomatic password creationAlthough I personally prefer…
The first thing to do is to create an array of categories id. Once done, you simply have to use the wp_set_object() function, which take 3 parameters: The post id, an array of categories to add to the post, and the taxonomy type (category in this example).
$category_ids = array(4, 5, 6);
wp_set_object_terms( $post_id, $category_ids, ‘category’);
Adding tags to a post is extremely easy as well. The only difference with the code to add categories is the taxonomy “post_tag” instead of “category”.
$tag_ids = array(7, 8, 9);
wp_set_object_terms( $post_id, $tag_ids, ‘post_tag’);
Thanks to WPProgrammer for this very cool snippet.
Looking for WordPress hosting? Try WP Web Host. Prices starts at $5/month and you can try it for free!Add categories or tags to post programatically
It looks like Media Temple WordPress installs have been hit with a WordPress Redirect Exploit. We got hit here at DigWP.com, but have cleaned things up and are taking steps to prevent it from happening again. Here is what Media Temple knows so far:
Visitors viewing posts on your blog may be redirected to a third-party site. This may be a site already blocked by Google.
Visitors may also be forwarded to the domain googlesearch.com, which has already been disabled.
They provide steps for clearing things up, but it doesn’t look like the entry-point or source of this hack is known at this point.
The hack injects a short JavaScript string into your database at the end of each your post’s content. There are (so far) two known variations of the inserted garbage:
<script src=”http://ae.awaue.com/7″></script>
<script src=”http://ie.eracou.com/3″></script>
To clean this up asap, backup your database and run the following SQL queries:
UPDATE wp_posts…

Today I did something I’ve never done before: I started to “SEO Optimize” my WPShout posts, seeing which posts were doing well in search results and how I can make these posts do better in search results. I also had a fiddle around with my theme to make sure it was all in fine optimised order.I have no idea if it’s as a result of this, but after doing my optimization, WPShout has suddenly jumped to PR 5 (I believe it was last at PR 3).The finding bit.1. Find your best postsHead over to Analytics (or whatever you use), set the time back to the beginning of the year and see what your best ten results have been. It’s important to you’ve got a wide date span so results aren’t skewed by your most recent posts.I did this and found there were eight posts which were all a couple of…
If you missed the Matt Mullenweg vs. Chris Pearson debate live debate today, this is my wrap up:
Matt: Thesis is violating the law because it violates GPL.
Chris: No it isn’t.
Matt: Businesses can thrive under GPL.
Chris: So?
Matt: Why won’t you bring Thesis over to GPL?
Chris: Because I would feel like I’m doing something against my personal beliefs.
Matt: We might sue you.
Chris: Bring it on.
It was interspersed with various (what I felt to be) personal attacks and chest thumping. No conclusion was come to.
As for me, I don’t know enough to have super strong opinions on all this. I do know that I’d way rather be friendly with the WordPress community and its founding fathers than at odds, so if Matt asked me to do something, I’d generally just do it. Hey, that’s why the domain of this site is digwp.com and…

This series is supported by Webtrends Mobile Analytics, which lets you monitor the adoption and usage of your mobile apps and mobile sites. To keep up with Webtrends Mobile, add their blog to your RSS reader.One of the most difficult aspects of designing for the mobile web is making your site compatible and accessible across different devices. A mobile-optimized site might look great on your iPhone or Android device, but utterly fall apart on Symbian or BlackBerry handsets. Likewise, a simple WAP-enabled site might be fine for feature phones, but fall short of expectations when it comes to newer and more advanced devices.We’ve covered some of the ways to streamline the process of creating your mobile-optimized site in the past. Today, we want to take a look at some specific tips and tricks for testing and adding compatibility for different types of devices. 1. Narrow Your FocusIt’s natural to want…
This article is split into two parts for ez reference. First some information on the evil WordPress “Pharma Hack”, and then a recipe for protecting your site with a solid security lockdown. Choose your own adventure:
Pharma Hacked
Security Lockdown
Pharmaceutical Apocalypse
A few weeks ago, DigWP.com was hit with the so-called Pharma Hack. We discovered the hack after some Google results turned up all sorts of spammy pharmaceutical garbage littered throughout posts, links, and titles. The tricky part about the hack is that it injects the spam garbage only when your site’s pages are requested by a search bot (e.g., googlebot). So when you view your pages in a browser, everything seems perfectly normal. Put simply, the hack is cloaked. We had no idea anything was wrong until about two weeks after the attack. During that time a majority of our search engine results were nuked with evil pharma…
This looks awesome: “The WPAlchemy MetaBox PHP Class can be used to create WordPress meta boxes quickly. It will give you the flexibility you need as a developer, allowing you to quickly build custom meta boxes for your themes and plugins.”
Direct Link to Article — Permalink on DiWLike the article? Get the book!
© 2010 Digging into WordPress | Permalink | Comments | Add to
Delicious
Categorized: Links | Tagged:
The discussion starter post last week about WordPress theme frameworks worked nicely. I really enjoyed the comment thread that took place so I thought I’d point it back out to people who may have missed that or didn’t see it fully developed. Specific thanks to Justin Tadlock and Nathan Rice for sharing their thoughts as authors of popular frameworks.
Direct Link to Article — Permalink on DiWLike the article? Get the book!
© 2010 Digging into WordPress | Permalink | Comments | Add to
Delicious
Categorized: Links | Tagged:

WordPress includes a lot of stuff through the wp_head() hook included in most themes. Most of this stuff I would consider unnecessary. A few lines of extra code in your header probably won’t slow your site down that much, but I like to keep things as clean and efficient as possible.
In this quick tip post, I’ll go over how to remove the following from being output through the wp_head hook.
Really Simple Discovery (RSD) link
Windows Live Writer link
WordPress generator notice
Post relational links
Read on for the description of each of these to see if you need them or not, and how to remove them.
Really Simple Discovery
This is the code that displays the following code in your header:
<link rel=”EditURI” type=”application/rsd+xml” title=”RSD” href=”http://example.com/xmlrpc.php?rsd” />
This is the discover mechanism used by XML-RPC clients. If you have no idea what this means and/or don’t integrate services…
Congratulations to the following three winners of our July 4th Book Giveaway:
Seth
John Schibelli
Jenny
Each winner receives a free copy of Digging into WordPress, including all of the free themes and lifetime updates. We’ll be sending your download links immediately.
AND: as the first name picked, Seth also wins the huge stash of authentic WordPress swag! Congrats :)
Thank you to everyone for entering and also for sharing some great ideas for the book. We’re working diligently on DiW v3.0, so your suggestions are extremely helpful (and appreciated).
Like the article? Get the book!
© 2010 Digging into WordPress | Permalink | 9 comments | Add to
Delicious
Categorized: Site News | Tagged: 3.0, book, giveaway
While I was fiddling around with a new plugin that uses custom post types for WordPress the other day, I ran into a small issue that I hadn’t noticed before. Meta capabilities for custom post types were not being automatically mapped, so I couldn’t have granular control over permissions.
At first, I was a bit disappointed that this wasn’t taken care of because this would be a major blow to my plugin. However, I soon learned this could be considered a great feature rather than a bug.
Andrew Nacin mentioned that we’d need to “roll our own handling” for capabilities using the map_meta_cap hook. This hook gives you control over the meta capabilities as well as the power to step outside of the WordPress way of doing things. The more I play around with it, the more I’d rather WordPress not automatically map these.
Before reading on, please note that…
[EDIT] Peter Westwood, one of the lead devs, in a comment below suggests against the use of this plugin because of the complexities of the setup process that might be ignored if users install and enable this plugin without following the steps. He points users to the Codex article that explains the setup. If the preliminary setup is that complex, code could be written to understand, walk people through and then validate those setup steps in the future. I am pretty sure the core is going to get more mature about this. So this is just the first step.
Enable Multisite in WordPress 3.0 With One Click!: Sarah Gooding from WPMU.org notifies us of a plugin (which can be downloaded from the WordPress Repository) that will enable MultiSite functionality on your WordPress blog with just one click. Installation for the Enable MultiSite plugin seems relatively simple and the process to…
4,108
Curious what others are searching for? Below are the most popular search terms over the last 30 days.

