Generate Link to Wordpress Home Page with the bloginfo Function

August 18th, 2009 No comments

Problem

Most Wordpress developers will develop their theme locally and then move it to a production server once it’s ready to launch the site. A problem can arise when you want to generate links to your blogs homepage on the dev site and then when you move to the production server, your links all break. Also, if you move your blog into another directory or subdomain for some reason, your links can also break.

Solution

Rather than hard coding your home page url into your theme pages, you can use the bloginfo() function to instead load the blog url that you entered into the Wordpress Admin section, that way you’ll always load the correct link.

The wordpress url is where you installed wordpress to on your server

The wordpress url is where you installed wordpress to on your server

So wherever you want to load your blog’s home page url, instead of hard coding the url, use this piece of PHP code:

<?php bloginfo('url'); ?>

This should hopefully help prevent some headaches when developing a theme that will eventually be located at different domains.

Slowly Building Traffic

August 18th, 2009 No comments

I’m not particularly concerned with the amount of people that read this site; I’m not trying to make any money off of this site and I’m not even really looking to build up any sort of reputation from it. It’s just a creative outlet.

That being said, I, like all people, have an ego. And seeing my traffic numbers increase is always a pleasant surprise. Since starting my “Make Wordpress Do What You Want” series, I have seen my traffic increase to about 10-25 visitors per day on average. Nearly all of that traffic comes from organic search. Here’s what my traffic looks like for about the last two weeks:

Averaging 10-25 visitors a day organically

Averaging 10-25 visitors a day organically

This is by no means a lot of traffic. But it is encouraging for two reasons: 1) I plan on adding at least another dozen Wordpress tricks to the site, which should boost the traffic another 20-30 visitors a day and 2) I have plans to experiment with ad revenue generating micro niche sites for some nice recurring income.

That second item is potentially a great thing. I’m hoping to have half of my income come from micro niche sites by the new year (obviously if I can get more than that’s even better). I’ve learned the right tools I need to find the niches, I have a list of really powerful link building resources to use, and I have all of the technical know how to make it happen.

We’ll see how it goes.

I Need To Read More Bertrand Russell…

August 11th, 2009 No comments

The trouble with the world is that the stupid are cocksure and the intelligent are full of doubt.

Bertrand Russell


Categories: Blog Tags:

Make a Side Table Out of Free USPS Priority Mail Boxes

July 28th, 2009 1 comment

So over the weekend my roommates and I picked up a huge brand new corner couch for our living room and that forced us to completely rearrange things to make everything fit. When we did that, we realized we needed a table to go between the recliner and the end of the couch. You know what that means? Time to play with some free shit from the post office!

Backstory

A while back, I learned that you can go the USPS website and order a lot of mailing materials for free. A lot. For free. No shipping or handling. They bring you hundreds of boxes and envelopes for free. To your doorstep. Excellent.

So I’ve had these boxes in my closet for a  while now. I built a coffee table a while back but it has since been trashed pretty good from parties and get togethers and spilled drinks so we’re going to toss it. But today presented a perfect instance for building yet another piece of furniture out of free boxes from the post office.

What You Need To Build the Side Table

To build this side table, you will need:

(10) Assembled Priority Mail Shipping Boxes

10 Assembled Priority Mail Boxes

10 Assembled Priority Mail Boxes

 

(1) Tape Gun For Boxes

1 Tape Gun for Boxes

1 Tape Gun for Boxes

Another option instead of the tape gun is that you can use free USPS stickers. That’s a little bit more tedious and since it’s just a damn cardboard table, don’t worry about it and just gun it.

Building the Table

First of all, once you have all of the boxes put together, pair them off into sets of two and tape them together along the wide side with a strip of tape from the gun that wraps all the way around the seam, like in this picture:

Pair of Boxes

Pair of Boxes

Next, put together an “H” shape with the sets of two boxes, with the long side down, like in this picture:

The Bottom of the Table

The Bottom of the Table

You’re just going to have to eyeball to make sure things are even because if you even think to use a ruler on cardboard table then you’re trying too hard. I did this step by lining things up and then taping along the tops to get things held together, then I added strips along the inside joints to prevent twisting and to add some strength, like so:
Tape on the inside of the bottom of the table

Tape on the inside of the bottom of the table

Now, once you have that bottom part put together, tape together the remaining two sets of boxes to make a 2×2 top for your table:

Top of the table assembled

Top of the table assembled

After that, you’re going to attach that top of the table to the bottom. The best way to do that is flip the top of the table over and center the bottom on it, then use 6″ strips of tape to secure the bottom all the way around to the top of the table:

Attaching the bottom to the top of the table

Attaching the bottom to the top of the table

Once that’s done, chances are when you flip the thing over it’s going to rock around because it isn’t perfectly aligned. The best way to fix that is to stand the table up and slide pieces of cardboard under the legs as shims to level it out, then flip it back over and tape on those shims like so:

Shims on the bottom of the table

Shims on the bottom of the table

Now you should be good to go! Here’s what mine looks like in my house now, not bad for being free and taking 20 minutes:

Table in my living room

Table in my living room

These tables are surprisingly strong, most likely because the post office has to use tough boxes to protect what’s being shipped. Regardless, it’s a cool and tacky little way to add a conversation piece to your living room.

Automatically Display Related Posts on Your Wordpress Blog

July 20th, 2009 No comments

Problem

There are two really important reasons why you want to add a list of links to related posts on your Wordpress blog for each post you right. The first is that this is a really useful thing for your readers. Most likely, unless the people reading your blog are subscribed to it or are reading it because they know you, your users reached your blog through the search engines. If that’s the case, after having read what they came to your blog looking for, having a list of other relevant posts can greatly increase the chances of them staying around and enjoying your other posts. This will increase your readership and potentially convert these new visitors into subscribers.

The other reason to add related post links is because interlinking pages on your site is a big deal for SEO and properly doing so can greatly increase the chances for the search engine spiders to successfully crawl your site. If you’re looking to crow your traffic organically, that’s obviously a really big deal.

Now, having to manually add a list of links to the bottoms of your posts is tedious and pretty dumb. So how do you do it automatically?

Solution

yarpp-relatedness-screenshot

Click to Enlarge

The plugin that solves this problem is hands down one of the smartest plugins I’ve ever used. Download Yet Another Related Posts Plugin and active it. The way this plugin works is it calculates a “match score” for each pair of posts on your blog and caches those results. It does this by considering all of the relevant parts of a post in a special algorithm that decides how similar two posts are. You are able to decide exactly what options are considered when the program calculates related posts.

Then, after you write a new post and view it on your site, the plugin will display the 3 most relevant related posts on your site as links after the body of your post. Over time, the algorithm will get smarter and smarter as it has more and more content to work with.

Click to Enlarge

Click to Enlarge

The one caveat for this plugin is that you won’t see super accurate results until you have written a good amount. Initially, the plugin will either say that it hasn’t found any similar posts or that it has only found 1 or 2. You can mess with the “Match Threshold” in the settings to get better results, or if you just wait a little while you will begin to see better results as the amount of content on your site increases.

 

A Little Inspiration From Gary Vaynerchuk

July 19th, 2009 No comments

Vaynerchuk is a crazy bitch. I’ve only recently started following him but what he preaches is pretty amazing considering how successful he’s become simply by hustling his way to the top. The man works harder than his competition and that has propelled him to success. Sounds simple, but obviously his mentality is what you need to get your projects rocking and to get a leg up on the competition.

Here’s his most recent video, you can see his intensity simply in his facial expressions, the guy is fired up:

There’s a Lot of Spam Out There Apparently

July 19th, 2009 No comments

I never really thought that running spam plugins was necessary on a site that doesn’t get too much traffic (maybe one day…). But after I switched to this new theme, I decided to add the Akismet widget to the sidebar to show how many spam comments have been blocked by it.

akismet-5000-spamAnd, crazy enough as it is, it has blocked over 5000 spam messages on this little blog. That’s pretty incredible considering the traffic this blog usually receives. Goes to show how many automated tools out there are beating up sites with automatic comment posting…

Categories: Blog Tags: , ,

Automatically Generate and Submit an XML Sitemap with Every Wordpress Post

July 19th, 2009 2 comments

Problem

All of the major search engines now use XML sitemaps as a way to have a reliable map of your whole site when it comes time for them to crawl it. This is a key thing to have in your root directory as it nearly guarantees that your whole site will be crawled next time the spider hits your site. Without the sitemap, there’s a potential that some of your pages can get missed.

Also, by submitting your sitemap after adding new content, you can help speed up the spidering process for that new content, helping it reach the search engine result pages even faster.

But when it comes to generating and submitting your XML sitemaps, the situation kind of sucks. Especially if you find yourself posting a few times a day on your blog, you’ll quickly give up on doing all of the manual work to get your sitemap sent out across the internet for the search engines to use.

Solution

Click to Enlarge

Click to Enlarge

The way to solve this manual work problem is to download and install the plugin Google XML Sitemaps. What this plugin allows you to do is configure which search engines you want to submit to, how frequently, and how you want the XML Sitemap to be built, and then it will automatically take care of all of the manual work of getting everything generated and submitted for you.

Once this plugin is installed and configured, you can be sure to have your site being constantly monitored by the search engines as you add more and more content. This plugin is essential for anyone looking to increase their SEO rankings through the major engines.

 

Theme Redesign

July 16th, 2009 No comments

Like I mentioned earlier in the week, I have been throwing around different theme options for this blog. I settled on one that was running stock until earlier, when I slapped in a nice grungy metal background with cool little header.

I’ll probably leave the theme like this for a while until I see what direction this here blog is heading…

Disabling Automatic Post and Page Formatting in Wordpress Themes

July 16th, 2009 2 comments

Problem

Sometimes when working on Wordpress powered sites, especially those that require a lot of custom HTML/CSS formatting through the HTML tab of the editing page, you’ll run into instances where the automatic formatting Wordpress uses becomes really annoying. Wordpress runs a filter on the content of your pages and posts that automatically adds in paragraphs where you might not want them sometimes.

Obviously if you’re sticking to writing relatively simple posts without too much formatting, this isn’t a big deal. But if you using a lot of custom CSS styles in your pages to style pages in a more radical way without having to mess with template files, you’ll need a solution that allows you to bypass that automatic formatting.

Solution

There are a few ways to filter your automatic formatting in Wordpress but the following is the best. You need to add a bit of code directly in front of the call to “the_content()” that disables the filtering. So instead of calling the_content like you normally do in a theme page:

<?php the_content(); ?>

…you would add a single filter directly in front of that comment, like so:

<?php remove_filter ('the_content', 'wpautop'); ?> 
<?php the_content(); ?>

That will disable the formatting of the body of your page. Be careful with using this filter tag, as all of the clean formatting that Wordpress normally applies will disappear when you use it. Your best bet is to create a copy of whatever template page you want this to be applied to and rename it so you can select it as a custom template when writing your new page.