Support » Plugin: WordPress Tag and Category Manager - AI Autotagger » [Plugin: Simple Tags] Click tags and suggested tags boxes not showing up for custom post type

  • So with the old version of simple-tags I was able to easily tag all of my articles (a custom post type). I still haven’t been able to figure out how to get the meta boxes for those two options to show. The “Tags (Simple Tags)” box where we can manually type in the tags and below it is a box titled “Simple Tags-Settings” which is empty. The settings box is actually empty when I edit posts or anything else but that’s a separate issue. I can still mass edit terms for articles but having one person do them all at once sort of defeats the purpose since we have many different people posting at different times.
    Anyone have any luck getting these metaboxes to work with custom post types? The code for this plugin is pretty poorly organized so I didn’t want to blindly mess with it too much but at this point I’ll take any suggestions.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Yes, Same issue here. I can’t get the tag suggester to work for any custom content types. Anyone have a fix?

    Has anyone resolved this issue? I’m having the same problem. I’m looking everywhere and can’t figure it out. Version 1.7.4.4 never had this problem. What version are you running now? I’m running 2.0-beta9… the old version won’t even work with WordPress 3.1

    Found a solution to get Simple Tags meta box to show on custom post types.

    Find this section of code in inc/class.client.php and update with your “Custome-Post-Type” as shown below.

    function registerTagsForPage() {
    		register_taxonomy_for_object_type( 'post_tag', 'Custome-Post-Type', 'page' );
    	}
    
    	/**
    	 * Add page post type during the query
    	 *
    	 * @param object $query
    	 * @return void
    	 * @author Amaury Balmer
    	 */
    	function includePagePostType( $query ) {
    		if ( $query->is_tag == true ) {
    			if ( !isset($query->query_vars['post_type']) || $query->query_vars['post_type'] == 'post' ) {
    				$query->query_vars['post_type'] = array('post', 'page', 'Custome-Post-Type');
    			} elseif( isset($query->query_vars['post_type']) && is_array($query->query_vars['post_type']) ) {
    				$query->query_vars['post_type'][] = 'page';
    			}
    		}
    	}
    Thread Starter ZakS

    (@zaks)

    @steedancrowe did you get the suggested tags box to show up with that modification? I tried it and didn’t notice any difference. The manual entry simple tags box is still there and the empty simple tags settings box is still there but no new boxes.
    The changes to the code will have to be made wherever the meta boxes are registered. I will try to look through and find the code and let you know if I manage to get this to work.

    Thread Starter ZakS

    (@zaks)

    Ok that actually isn’t too hard of a fix. Just open up each of the class.admin.<box-name> files for whatever boxes you want to add and look for the add_meta_box line. copy/paste it (I would suggest the post one not page one so that you know it always runs) and just replace ‘post’ with the custom post type. Now repeat for whatever other boxes you want. I believe that Steedancrowe’s modifications are only necessary if you didn’t include taxonomy support for ‘post_tags’ when you created the custom post type, but I’m not 100% on that.

    Thanks for the tip, I found out that in stead of hacking the Simple Tags plugin files you can simply add the meta boxes in the declaration of your custom posttype in functions.php:

    add_action(“admin_init”, “add_clicktags”);
    function add_clicktags(){
    add_meta_box(‘st-clicks-tags’, __(‘Click tags’, ‘simpletags’), array(&$this, ‘boxClickTags’), ‘your_custom_posttype’, ‘advanced’, ‘core’);
    }

    (in the code above: substitute the (registered) name of your custom posttype in place of ‘your_custom_posttype’)

    Hey jacquesulje, your fix works great! Thanks very much for posting this!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Simple Tags] Click tags and suggested tags boxes not showing up for custom post type’ is closed to new replies.