Quantcast
Viewing latest article 22
Browse Latest Browse All 29

Add Custom Post Type Support to the AddQuickTag Plugin

If you like and use the AddQuickTag plugin by Frank Bültge, and you want to use it with your custom post types, you have to enable support in your theme’s functions.php file first. Just copy and paste the following code and change the custom post type name to the name(s) you’re using. Remove or add custom post types if necessary.

if ( !function_exists( 'my_addquicktag_post_types' ) ) {

  add_filter( 'addquicktag_post_types', 'my_addquicktag_post_types' );

    function my_addquicktag_post_types( $post_types ) {

    $post_types[]  = 'book';
    $post_types[]  = 'event';
    $post_types[]  = 'product';

    return $post_types;

  }
	
}

Viewing latest article 22
Browse Latest Browse All 29

Trending Articles