Category: Plugins

Plugins we have created

Quick Hack to Remove Auto ‘P’ Tag from Contact Form 7

Recently I had a situation where I needed to remove the auto generated ‘p’ tag from Contact Form 7, but could not do it in the conventional way. Contact Form 7 uses a number of constants, set in the WP config file, which allow behaviour changes. I always found that a bit of an odd approach (configuring a plugin’s options from the entire site’s config file), but it generally caused little concern. On this project, however, it was not possible since the site lives on a multisite install and only one theme required the change.

Surprisingly, I found no other filter options that could be accessed easily. I’m sure it can be done, but in the time I had I didn’t find anything. So the quick and dirty answer was to write a jQuery hack that can simply remove the ‘p’ tag for this one site. Here it is:

jQuery(document).ready(function ($) {

$(".wpcf7-form").find("p").contents().unwrap();

});

CPT Auto Menu now handles multiple custom post types

Version 1.1.0 of my Custom Post Type Auto Menu plugin is out, and I am happy to say it now handles multiple custom post types. This is a feature that was requested, and frankly does make a lot of sense. It took quite a bit of reconfiguring, so any previous users of the plugin will have to re-do their settings in order to make it work, even if they just update it (sorry about that!). But with only a single custom post type, that is an easy fix.

In the announcement post I explained how the plugin works. It is still basically the same, except that multiple post types, and therefore multiple menus and parent menu items can be selected.

An image of the CPT Settings screen

In this example three custom post types have been chosen: Motorycle, House and Project. After selecting CPTS’s it is neccessary to save in order to launch the Menu Settings tab.

Continue reading

Plugin: Custom Post Type Auto Menu

NOTE: The plugin has been updated since this post to handle multiple custom post types. This article still gives the basics but the settings have changed since then. Read about it here.

While working on a recent site, I realised that a simplified method for adding a new custom post type post to a menu was needed for the sake of the clients, who are not used to working with a CMS. In this case, the ‘Projects’ custom post type is used to encapsulate all the photos and information they would like to display related to each of their construction projects. The projects are listed on the ‘Projects’ page and displayed in the corresponding menu.
Continue reading