That Time I Tricked Google With Its Own Data

Once upon a time SEO was easy

Exact match keyword domain? Boom.
Pages for every keyword? Done.
Ridiculous internal link building? Easy.
Paid link building? Cheap.
Link Pyramids? Get me more shared hosting.
Link Stuffing? Count me in.
Scraping? Now we’re talking.

Back in 2007, I was working on one of the first Online Reputation Management (ORM) systems out there. Like Google did for the web, I built a spider/crawl program. But in my case, it was for a very young ecosystem – social media. It was so old school I launched it via text message on twittr.com.

screen-shot-2016-10-24-at-10-14-48-pm

The essence of the app was that a brand could enter a few keywords they wanted to track and the system would aggregate results from across the social web. Those keywords would likely be your brand or product. This was before Twitter had search functionality. Before they had purchased Summize (that $15M would have been nice though). So if you were Nike, you could see how people were talking about you online. Back then, this was new.

Soon after I built the foundation for this, Google made an interesting move with their Zeitgeist. You see, for a couple years, they released a so-called Zeitgeist of the top searches on Google for the year. This eventually turned into the Google Trends that we know today. It was mostly a marketing tool for them but then they released an RSS-based API. And that’s when the lightbulb moment happened.

screen-shot-2016-10-24-at-10-12-51-pm

I then took the platform I had built to monitor brands on social media and turned its focus on Google Trends. Instead of humans entering keywords to monitor, what if it was automated from data via Google Trends? Interesting.

So I hooked up the Google Trends RSS feed to the Fresh Feeds product I had built and called it Fresh Trends. This was cool. It was kinda like Techmeme for popular topics (I went on to create many verticals like Techmeme using this product as a backend).

The final product was a WordPress website. Each Google Trend was automatically created as a category in WordPress and then I searched my Fresh Feeds platform for content based on that keyword. The system would post an excerpt from the article along with the keyword-rich title. This happened hourly via a cron job. So in the end, I had the most content available for a trending topic on Google search. As Google pumped out trending search topics, I would take that data, search my Fresh Feeds system, and post relevant content to a separate WordPress website creating a highly optimized website based on the most popular searches for that hour. Repeat.

It got indexed by Google as top results for very high traffic, trending search terms. It was shown on top of Google News results with trending topics. It was awesome. Alas, it didn’t last forever.

screen-shot-2016-10-24-at-10-27-43-pm

And that’s the story of me tricking Google (the first time) with gray-hat techniques – in 2007.

Get Permalink By Page Name Or Slug

We used to write custom functions to return these values until we discovered you can pass get_permalink a function that will return the ID.

Examples..

Get Permalink By Page Name

<a href="<?php echo get_permalink( get_page_by_path( 'Events' ) ) ?>">Events</a>

Get Permalink By Page Slug

<a href="<?php echo get_permalink( get_page_by_path( 'events' ) ) ?>">Events</a>

Note On Hierarchical Pages and The Slug
If you have a page hierarchy you will have to pass the full slug including the parent to the get_page_by_path function.

Example… To get the permalink using method with child page, you need to pass the full slug. In this case we have a child page called “Parties” with a parent page called “Events”.

<a href="<?php echo get_permalink( get_page_by_path( 'events/parties' ) ) ?>">Parties</a>

WordPress Query Multiple Taxonomies

This example is for an employee directory. We created a custom post type called “employee”. For that custom post type we created two custom taxonomies – “type” and “department”. Lets say we want to find employees in the technology department that are programmers.

[code]$args=array(
‘post_type’ => ’employee’,
‘post_status’ => ‘publish’,
‘posts_per_page’ => -1,
‘caller_get_posts’ => 1,
‘order’ => ‘ASC’,
‘orderby’ => ‘title’,
‘type’ => ‘programmer’,
‘department’ => ‘technology’
);

query_posts( $args );

// loop it[/code]

Hopefully this helps if you are looking to query multiple custom taxonomies from custom post types in WordPress. Have questions? Let us know in the comments!

Cheatin’ uh? Error – WordPress Custom Post Types

This is for those of you hunting for the Cheatin’ uh? WordPress error when developing custom post types.

It’s most likely an issue with what you named a custom taxonomy that you intend to attach to a custom post type.

In our case we had…

[code]register_taxonomy("Types", array("portfolio"), array("hierarchical" => true, "label" =>; "Types", "singular_label" => "Type", "rewrite" =&> true));[/code]

This is a frustrating error because you simply get the “Cheatin uh?” message.

Here’s the fix

[code]register_taxonomy("types", array("portfolio"), array("hierarchical" => true, "label" => "Types", "singular_label" => "Type", "rewrite" => true));[/code]

Notice the difference? The fix is your custom taxonomy’s name has to be lower case. That should save you a couple hour hunt down a rabbit hole.

How To Add Social Sharing Buttons To WordPress Blog

A recent Quora question I answered… “How can I add social sharing buttons to my WordPress blog?

We’ve talked WordPress sharing plugins before…

But if you want multiple sharing options (LinkedIn, Twitter, Facebook, etc) then install the Sexy Bookmarks plugin and configure it to use whichever networks you want to have your content shared on.

If you want just Twitter and Facebook you can install just the Facebook Like Button and Twitter Tweet Button.

How To Add Social Sharing Buttons To WordPress
Social Bookmarks In Action on AdMavericks.com

WordPress Social Sharing Buttons

On most of our WordPress sites we use the Facebook Like button along with the Twitter Tweet button plugins and place theme into the theme with shortcodes. This way we have more control over where they show up and how they look in our WordPress themes.

Got questions? Comments? Suggestions? Let us know in the comments!