Custom WordPress Post Loop With Pagination via wp_pagenavi That Works!

For a client project, I needed to display recent blog posts on a custom page. I used the standard WP_Query method of pulling a custom page loop (this post does a nice job of breaking down all the possible WordPress loops), but I had a problem. I wanted to use the WP-PageNavi plugin, but I couldn’t get it to work. I would click on the next page, and instead of loading page 2 of posts, it would show page one…even thought the URI clearly indicated page 2.

I found some advice that suggested resetting my permalinks, but that didn’t help. I also found a few blog posts that claimed to solve the problem, but none of them worked either. Fortunately, the trusty old WordPress CODEX had enough documentation of the WP_Query function that I was able to figure it out.

After hours of testing and searching, I arrived at the following solution:

<?php
$paged = get_query_var( 'page' ) ? get_query_var( 'page' ) : 1;

  $args = array(
    'posts_per_page' => 1,
    'paged' => $paged
  );

  $loop = new WP_Query($args);

while ($loop->have_posts()) : $loop->the_post(); ?>

     **DO LOOP STUFF**

 <?php endwhile; ?><!--end custom loop-->

<div id="pagination">
<?php
if(function_exists('wp_pagenavi')) {
	wp_pagenavi( array(
		'query' =>$loop
	));
}
?>
</div><!--end pagination-->

The key is that the syntax for the get_query_var function changed as of WP 3.02 – the proper way to grab the page ID changed from get_query_var( 'paged' ) to get_query_var( 'page' ) – that’s paged to page.

Deleting the ‘d’ made it work.

Funny News Story Highlights Facebook Spam Problems, Facebook SEO Tricks

Anytime you have a big, user-generated website, you have spam. Facebook is no exception, but unlike other networks, Facebook spam can be hard to spot. Unless someone is blatantly obvious, it’s fairly easy to:

  • Create a fake profile assuming the identity of an attractive person
  • Randomly befriend people – If, for example, you pretend to be a recent graduate from CU-Boulder, Facebook will start suggesting “friends” who graduated at the same time that you say you did.
  • Casually suggest links, comment on walls, send messages, etc. to try and generate revenue, leads, etc.

If this is done carefully and infrequently, it would be almost impossible to detect. While the pay-off for this practice is minimal – Facebook limits users to 1,000 friends – it’s not as if there’s no money to be made here. What’s more, this practice could influence Facebook search results (more on that below)

So, what I’m saying is that Facebook has a spam problem, and that will continue until they force users to verify their true identity. The funny news story below (taken from Time online) illustrates just how easy it is for people to pretend to be someone they’re not on Facebook.

A woman named Angela Voelkert pretended to be a 17-year-old girl to draw out incriminating evidence from her ex-husband via Facebook by creating a fake account for 17-year-old “Jessica Studebaker,” complete with a trashily attractive photo, and friended her ex-husband. Then, in an attempt to gain information she could use against him in a custody battle, she chatted him up.

The trap has been set – Angela is pretending to be a young, attractive female to trick her ex-husband. How is this legal? What is Facebook’s responsibility here?

Fortunately, Angela’s attempt backfired: Read More

HostGator Auto-Billing Hosting Accounts? Tisk-Tisk

I used to work for a CPA network that had made a killing promoting a special teeth-whitening “free trial” consumer offer. The offer was profitable because of something called “auto billing,” also known as “auto-renew,” or the industry term “continuation model.” No matter what you call it, it boils down to taking advantage of a consumer’s lack of organization or awareness, and I don’t think it’s ethical.

While there are some major differences between the teeth whitening offer I describe below and Hostgator, I’m disappointed to say that Hostgator utilizes the same unethical auto-billing practice. Here’s how the teeth whitening offer worked and what it has in common with Hostgator’s billing practices:

Read More

Internet Fundraiser Marketing Tip: Use A Thermometer

Have you ever been tasked with raising funds for your favorite school group, sports team, charity event, etc? If so, you know that it can be downright difficult to get donations.

While there’s lots of great advice on fundraising out there – not to mention long lists of fundraising ideas, clever tools, and dumb fundraising gimmicks – most fundraising experts will agree that visible monetary goals are important to your fundraiser’s success. Why else do you think all the telethons have those big counters in the middle of their set?


What you see to the right is what I hope to be one of the best free fundraising tools on the Internet – a fundraising thermometer.

Here’s what makes this thermometer so special:

  • It’s automatically updated. You just create it once, save your settings, and then put the code on your website. As you raise more money, you just go back to the thermometer page and update your progress…no need to replace code.
  • You can customize the text and title
  • You can customize the background color, thermometer fill color, and text color to match your website
  • It’s free

I’m proud to say that we developed this tool for School-Fundraisers.com, and we hope it helps you, your school, or your favorite charity hit their fundraising goals. Here are some more ideas for you… Read More

Real Estate Marketing Question: Why Print Flyers Without A Price?

My wife Sara and I are in the market for a home. We’ve just begun the process of searching Denver to find the right neighborhood, etc., and I’m pleased to say it’s been a fun process for both of us. However, for all you real estate brokers, agents, REALTORS®, and real estate marketing people, I have one question:

What is the point of offering a property flyer that doesn’t include an asking price?

Real estate flyer box

Why print a real estate flyer without a price?

Let me paint the picture: Sara and I are driving through a neighborhood we like, and we see a home for sale with a flyer box. Four or five times now, we’ve come across a home flyer that doesn’t have any pricing info. Why? Read More

Internet Marketing Tips For Photographers – Interview with R. J. Kern

I had a chance to interview Denver Wedding Photographer R. J. Kern of Kern-Photo.com about marketing his wedding photography business online. R. J. is a very well-networked photographer who has done a very good job of building relationships with other photographers (and getting numerous links as a result), as well as establishing himself as an expert in the industry in Denver.

If you’re a photographer, this post is a must-read. If you’re a small business owner, this post might stimulate some ideas. Check it out. Read More

Funny Facts About Vail, Colorado

We’ve created another humorous infographic about Colorado – this time it’s specifically about Vail, Colorado. We’re hoping it will generate some links for our Vail real estate client, so if you feel like embedding this graphic on your own site and helping us build some links that would be awesome.

Feel free to tweet a link, “like” this on Facebook, Stumble it, Digg it, etc (thanks!).

Without further delay, here is our “masterpiece” – tell me what you think: Read More

Yahoo Small Business Web Hosting – Worst WordPress Host Ever

In my day to day life, I’m pretty direct. However, when it comes to writing my company blog, I try to be diplomatic. After all, this post is going to live forever.

Still, I have no problem saying the following for all to hear: Yahoo small business web hosting is the worst WordPress hosting option I’ve ever worked with, not to mention the worst web hosting option I’ve worked on.

Why, do you ask, is Yahoo’s small business web hosting so terrible? Here’s a list: Read More

How Do You Value A Link?

A client of ours emailed me a question that I think a lot of people have:

Do you have a way of evaluating links and their effectiveness compared to their cost  / effort needed to acquire them?

While we don’t recommend buying links outside of directories or sponsorships, the simple fact is every link has some sort of cost. If you have to sit down and write a guest blog post in order to obtain a link, then the cost is an hour or two of your time. If you have to pay someone to build links for you, you could decide to measure their work on a “money spent / link acquired” basis.

While I don’t recommend looking at SEO performance purely in terms of “cost per link” – links aren’t commodities – the question is a good one. Here’s how we decide if a link is worth going after or not. Read More

301 Redirect Header For an ASPX File

I spent some time searching for a code snippet today that would add a 301 redirect to an ASPX file. Since most of what I found was a little cryptic – and since the syntax was so different from one code sample to the next – I thought I would share the code snippet I found that worked. Read More