Home » Experts Only » WordPress Experts: Getting Slug by Single_Cat_Title

WordPress Experts: Getting Slug by Single_Cat_Title

An interesting problem that I came across in a recent project. The client needed a custom post taxonomy set to a gallery of choices on a featured section of their website. First we needed to add custom post types and category images plugins. Iterating through the taxonomy was a cinch but at one point I noticed that a few categories were not linking correctly. This is because we weren’t using the taxonomy’s slug but rather the name. After some searching we found this great little workaround to nail down the proper link. Slugs to the rescue!


 $cat = get_term_by('name', single_cat_title('',false), 'category');

 echo $cat->slug; 

 

http://codex.wordpress.org/Function_Reference/get_term_by

Perfect. Custom post types is a powerful tool but we’ve found a lot of weakness in terms of developing relationships between custom posts. Primarily when using CRUD – developing robust database relationships with WordPress is kind of a pain, not really there yet to replace the other options out there. I think this is because too many plugins and toolsets are gearing toward the idea of “no programming needed”  being a good selling point. Personally, it seems that just making programming easier would be the better option, rather than making a comprehensive alternative to programming. If you don’t know how to program, should you be programming at all?

Offline linking

This is a profound point. A lot of linking takes place offline. Sounds weird but many great links sprout from the personal relationships you make as a business. Noteworthy links can be found at your local chamber of commerce just like any Hotfrog or elocal directory site. “This

A Little ZipBamBoom From Livewire and You’re #1

Performance Transmission came to us in need of a Gainesville SEO Expert. Luckily, we have one of those and loan him out on occasion. They had tried other SEO tactics and were just not seeing the results they needed. No matter what they were doing they couldn’t jawbone

Florida Auctioneers Has A New Website

Proud to present the new and improved Florida Auctioneers Association Website! This was a lengthy project but the final website is well worth it. Really more of a web portal, the system is chock full of features and runs smooth and fast. The site features: Membership program Member

Guardian Association Management Has A New Website

Pleased to introduce the new Guardian Association Management website. This is a clean minimalistic layout that funnels users directly into services and payments pages. Gainesville GAM came to us needing something up in a timely manner, clean, modern, and looked great on mobile. We were happy to oblige.

The Greatest Watch In The History Of Mankind

Well, this has little … really nothing … to do with website design or SEO but we would like to take a moment to recognize the greatest wood watch in the entire world. This thing is decked out. Sleek, modern and unique. It slides on like a Gregory

Using Red In Website Design

A key component of website design is color, and many designers choose the color red in particular. Red is a passionate, vivid color that may elicit strong feelings and emotions, making it a fantastic choice for designing a strong, compelling website. These are several justifications on why red