PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Remove "Add Form" button from custom post type Edit page

  1. Hi, I have a "Directory" custom post type, and don't want users to add forms in the WYSIWYG section. So I need to hide/remove the "Add Form" button here, but keep it visible on the "Post" edit page.

    I can't find any hook to do this. Is it possible to remove the "Add Form" button next to "Add media" button for a given cutsom post type edit page?

    Thanks!

    Posted 11 years ago on Tuesday December 18, 2012 | Permalink
  2. So you would like to leave the button to insert a Gravity Form visible when editing a post, so long as it is not one of your custom post types?

    Posted 11 years ago on Thursday December 20, 2012 | Permalink
  3. Exactly! In our site, it doesn't make sense to add a form for a custom post type created to add people in a team, or to manage a directory of companies.

    I couldn't find any hook to do that. Am I wrong?

    Posted 11 years ago on Thursday December 20, 2012 | Permalink
  4. Please add this to your theme's functions.php: http://pastebin.com/UBXeVhEk

    That should hide the "Add Form" icon for custom post type"directory". I just tested it with the post_type of "page" since I don't have a Directory custom post type, and it hid the icon for me.

    Posted 11 years ago on Thursday December 20, 2012 | Permalink
  5. You could also create a role which does not have the capability to add forms to a post. Hiding the icon will not prevent someone from inserting the [gravityform] shortcode. It just removes clutter from the interface.

    Posted 11 years ago on Thursday December 20, 2012 | Permalink
  6. Thanks, thats works!

    Posted 11 years ago on Monday January 14, 2013 | Permalink
  7. Awesome - I'm glad that worked for you.

    Posted 11 years ago on Tuesday January 15, 2013 | Permalink

This topic has been resolved and has been closed to new replies.