Blog

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>
Link | Comments

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.

$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

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!

Link | 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…

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

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

Here’s the fix

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

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.

Link | Comments

WordPress E-Commerce – PrintShowerGames.com

Our latest project was a WordPress E-commerce store selling printable baby shower games.

Screenshots

Baby Shower Games

Baby Shower Word Scramble

Free Baby Shower Games

What We Did

  1. WordPress Hosting
  2. SEO and Site Optimization
  3. Landing Page Design (see free baby shower games)
  4. Site Configuration / Optimization
  5. WordPress Theme Design and Updates
  6. E-Commerce Integration

Questions? Comments? Let us know below!

Link | Comments

Dwolla vs PayPal – Fees

We have started expanding our WordPress services overseas – which is great but it’s surprisingly difficult to get paid without getting gouged. Luckily Dwolla is working on it.

Today, Dwolla posted some graphics today on how their rates compare to using debit / credit cards. Here’s what it looks like compared to PayPal for the average cost of one of our WordPress sites…

PayPal Fees vs Dwolla Fees

PayPal Fees vs Dwolla Fees

It adds up quickly!

Link | Comments

What’s The Best Forum Plugin For WordPress?

Andy’s answer on Quora to What’s the best forum plugin for WordPress?

  1. Simple:Press
  2. bbPress
  3. BuddyPress
Link | Comments

WordPress 3.0.5 Released

WordPress 3.0.5 was released today

This security release is required if you have any untrusted user accounts, but it also comes with important security enhancements and hardening. All WordPress users are strongly encouraged to update.

Release details can be found here.

Link | Comments

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!

Link | Comments

How do I SEO my WordPress hosted blog?

I regularly post answers on Quora to WordPress questions and will be cross posting some of my more popular answers here…

This question was how to SEO a WordPress blog. I always start with these simple steps….

  1. Set up permalinks properly (I use %category%/%postname%)
  2. Install All-In-One SEO plugin
    • Put keyword in Title
    • Put keyword-rich description for Meta description
  3. Optimize On Page elements
    • Post/Page titles should be H1/H2
    • Link to internal pages with keywords
    • Use alt/title elements with keywords in them
  4. Write good keyword-rich content
    • First step is to know what keywords to target
    • Second step is to write well using those keywords

Those are the basics and should get you started with a highly optimized WordPress site. Once you get this far you can begin to take it to the next level…

How do I SEO my WordPress hosted blog?

Questions? Comments? Let us know below!

Link | Comments

hashDSM – Des Moines In Real Time

A couple nights ago we launched one of our fun side projects we dubbed hashDSM (or #dsm).

Naturally, we built the site on WordPress but the concept is to monitor commonly used Twitter hashtags in Des Moines, Iowa and aggregate them into a real-time stream organized by topics. We crowd sourced the common hashtags from a question on Quora.

WordPress Site - hashDSM

There are a few issues left we hope to iron out (like caching for when the Twitter API doesn’t respond) but thought we’d get it out there anyway.

Questions? Comments? Feedback? Please let us know in the comments or on Twitter.

Link | Comments

Want to work with us?

Do you need help with WordPress? Get in touch right away. We can't wait to work with you. Call us at (515) 966-4848 or email Andy.

Recent Posts

Follow Along