Support » Plugin: Gravity Forms + Custom Post Types » [Plugin: Gravity Forms Custom Post Types] Custom Taxonomy not being assigned per capabilities

  • I have a special user role (S2member level 2 to be specific) that is posting to a custom post type using a Gravity Form and this plugin. The custom post type capability is set to post. Everything is working properly, except a custom Taxonomy called Specialties is not being properly assigned to the post. However, if I login as an Admin, the taxonomy is properly assigned.

    The register_taxonomy includes this setting:

    'capabilities' => array (
                    'assign_terms' => 'publish_posts'

    and publish_posts is assigned to this special user role.

    So, either I’m not using the proper capability, or I’ve found a bug in the plugin. Any suggestions?

    [ Don’t bump, that’s not permitted here. ]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author bradvin



    The plugin does not look at any user roles or capabilities of the taxonomy. All it does is list them and then saves them to the post using function calls:




    depending on the type of field used.

    So I do not see how it could be a bug within the plugin?


    Thanks. So would you speculate the capabilities aren’t the issue at all, since the plugin doesn’t use them?

    I’ve test the form logged in as every user level, and the admin is the only one that properly assigns the taxonomies to the CPT.


    I had a conflict in my page template, because loading the form in a regular template worked fine.

    The template checked to see if the logged in user had already created a post or not, and then didn’t give them access to the form if they had. Not sure what the conflict was, but this was the code I was using for future reference:

    <?php $count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = $current_user->ID AND post_type IN ('directory') AND post_status = 'publish'" );
    if ($count != '0')  { ?>
    	<?php $loop = new WP_Query( array( 'post_type' => 'directory' , 'posts_per_page' => 1 , 'author' => $current_user->ID ) );
    		while ( $loop->have_posts() ) : $loop->the_post();
    		$link=get_permalink(); ?>
    		<h1 class="entry-title">Manage Your Profile</h1>
    		<div class="entry-content">
    			<p>There is already a Directory Listing connected to this account: <a>"><?php the_title(); ?></a>. Please visit that listing and edit it if you need to update your profile.</p><p>If you would like to cancel your membership, use the link below. Your listing will stay active through the remainder of your annual membership.</p>
    		</div><!-- .entry-content -->
    	<?php endwhile; ?>
    <?php } else { ?>
    	<h1 class="entry-title">Create a Listing</h1>
    	<div class="entry-content">
    		<?php echo do_shortcode('[gravityform id="2" name="Directory Creator" title="false" description="false"]'); ?>
    	</div><!-- .entry-content -->
    <?php } ?>
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Gravity Forms Custom Post Types] Custom Taxonomy not being assigned per capabilities’ is closed to new replies.