Posts tagged as:

WordPress Plugins

Simple Taxonomies Formatting — Improve the Plugin’s Code Output

August 13, 2009

Making the Simple Taxonomies WordPress Plugin Semantic

I’ve been using Joost de Valk’s Simple Taxonomies plugin for a couple of projects, and I’ve been very disappointed by the formatting of the terms output code.

When configuring the plugin, you have the option of choosing “Add terms to the end of posts” or “Add terms to the end of excerpts.” If you do, you get a <div> and a couple of spans. Not very semantic. Also, the code uses an #id, instead of a .class, meaning that if you have more than one post on a page with taxonomies, it no longer validates.

Simple Taxonomies uses terms, so let’s make a list of them!

Here’s a way to reformat the code and prevent overwriting in future plugin updates. We’re going to strip the code and use a definition list instead (<dl>). Definition lists in HTML have a term and description; just as a custom taxonomies creates a taxonomy and its terms.

Read the full article →

Hidden Fields Module for Contact Form 7 (2.x) WordPress Plugin

July 24, 2009

Add hidden fields to a great form creating plugin!

I love the Contact Form 7 plugin, and use it for many of my projects…but one thing it’s missing is the ability to add hidden fields.

Now that Contact Form 7 2.0 has been released, it’s easy to add new types of inputs.  Add hidden tag functionality and “Generate Tag” capability by downloading the file below and replacing/adding the three files included.

Updates:

  • August 5, 2009 – Now updated for 2.0.1
  • August 11, 2009 – Fixed bug with 2.0.1 Version. Thanks, @Courtney

  Contact Form 7 2.0.1 - Add Hidden Fields (13.0 KiB, 500 hits)

  Contact Form 7 2.0 - Add Hidden Fields (11.8 KiB, 327 hits)

Read the full article →

How to tell if your WordPress Plugin or Widget is Activated in WordPress

June 2, 2009

Check your plugin or widget activation & settings

Ever wonder if your widget or plugin is activated on an external site?

Here’s how to find out.

When you register a sidebar widget, you use code like this:

register_sidebar_widget(array('Name of Widget', 'class-of-widget'), 'widget_function');

If you want to check whether the widget is activated (you may want to for a variety of reasons), you can do it like this (the “class-of-widget” value from above will be used in the code below):

Read the full article →