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.

$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!

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.

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!

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.

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!

WordPress Theme Updates – Skeletor

We’ve pushed some revisions to our WordPress base theme “Skeletor“. These are some minor updates as we work on a bigger update for this fun project!

What is Skeletor you ask? It’s a base theme for any new WordPress development we discussed in a prior post. We are trying to build a theme with all the plumbing you need in place to build any WordPress theme from scratch. This is more about convention than it is design. It’s a skeleton theme – hence the name :)

WordPress Theme Commits

Protecting WordPress Video Walkthrough

A video walkthrough from Brad Williams on keeping a WordPress site secure from WordCamp Boston.

Some WordPress Resources

Over the last week we have been pushing some code out that we use to efficiently run a WordPress consulting company.

WordPress Skeletor

Skeletor is a WordPress “skeleton” theme that we have been using as a starting point for any new custom theme development. It’s got all kinds of bells and whistles we’ve added since our initial fork of Kenneth Reitz’s WordPress Theme Skeleton project. Basically it has all the “stuff” you need to start a new WordPress theme from scratch.

We’ll be adding features as we need and will let you know about them so you can use it for your WordPress theme development needs.

WordPress Multi-Site

A by-product of doing WordPress consulting is WordPress hosting. For the last few years we have recommended hosting services and used various ones for our own projects. Not anymore. We are now developing a scalable WordPress hosting platform we can offer to our clients (and anybody serious about WordPress hosting for their business).

The base of that platform is a combination of WordPress Multi-Site and Domain Mapping. We’ve packaged up the platform we are currently developing on so you can do the same (well, you’ll have to configure your own server).

Oh – and if you don’t want to try to run this yourself – we can handle that for you :)

WordPress Multi-Author Widget Plugin

Coming soon – our WordPress Multi-Author Widget plugin. This was another by-product of WordPress consulting. In one of our latest projects for Des Moines ad agency Lessing-Flynn we needed to replicate functionality that WordPress.com offers in one of their widgets.

After we couldn’t find anything – we built a plugin. It’s running on their site now and will soon be added to the WordPress plugin repository as well as GitHub.

Questions? Comments? Let us know!

WordPress Weekly Email Newsletter

Today we dropped our plans for a weekly WordPress newsletter for those of you out there that use WordPress for your business. We’ll cover things like themes, plugins, administration, optimization and more.

WordPress For Business Newsletter

Sign Up Now!