WordPress.org

Support

Support » Plugins and Hacks » Attachments » [Resolved] Removing it from default post types: page and post

[Resolved] Removing it from default post types: page and post

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi, change this part:

    // all post types to utilize (string|array)
        'post_type'     => array( 'post', 'page' ),

    to:

    // all post types to utilize (string|array)
        'post_type'     => array( 'YOUR CUSTOM POST TYPE' ),

    Plugin Author Jonathan Christopher

    @jchristopher

    Thank you for helping with support, Gianluca Cherubin!

    Should I make this change in the plugin file or in my code? If its the later case then I tried using the code:
    ‘post_type’ => array( ‘my_cutom_post_type’ ),

    But still I am able to see attachment section there under posts and pages.

    Isn’t there any other of removing it from post and page via a hook/action?

    Plugin Author Jonathan Christopher

    @jchristopher

    You should never update the plugin code, just because it’ll get overwritten every time the plugin updates.

    As per the docs, Attachments ships with a default instance that adds a Title and Caption field to Posts and Pages. If you’d like to disable the default instance, please check this out.

    That will remove the Attachments instance that’s showing up on your Posts and Pages, it’s then up to you to create a custom instance, making sure the post_type argument matches your Custom Post Type name.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Removing it from default post types: page and post’ is closed to new replies.
Skip to toolbar