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?

More Web Design Blog Content

Is DIY Website Design Costing You More Than You Think?

Brought to you by Livewire – Professional Web Design and SEO Services Building your own website sounds like a budget-friendly way to get your business online. Platforms like Wix, Squarespace, and WordPress make it look easy. Just drag, drop, publish… right? But here’s the catch: DIY web design

Project Gutenburg

Every heard of it? If not, make sure to check it out. They have tons of books online, free for anybody. Our favorite? A Connecticut Yankee in King Arthur’s Court by Mark Twain http://www.gutenberg.org/ebooks/86 Got a smartphone? Just download a free e-reader and you’re all set. Download the

Is PPC Advertising Worth It?

The answer is: it depends. In our experience it really comes down to your industry, your ad’s effectiveness and … dum de dum dum … money. First, your industry should be visible online in the first place. Holly’s Bakery is probably going to do fine on Google ads

New Website: Top Dawg Detection

Bed bug detection is a fascinating new business. Trained in a facility up north, these dogs are trained to detect even a single bed bug. Most of the business is certifying hotels and motels as “bed bug free”. These dogs are about 97% accurate and are fun to

Understanding Value

At Livewire, we definitely understand what value means. As primarily a B2B driven business we know that value goes beyond a ROI, although that is incredibly important. A proper return on investment is the measuring stick by which most business owners value our services, and that is totally

TradePMR has a new website

A really great client – TradePMR – just launched their new super awesome, totally spectacular, mobile responsive website! We worked with their staff for the last 8 weeks to put together an entirely new online experience for their customers. Livewire will be conducting conversion optimization audits over the