Title: modify Linker post type capability_type
Last modified: August 22, 2016

---

# modify Linker post type capability_type

 *  Resolved [saeed shabani](https://wordpress.org/support/users/dnoj/)
 * (@dnoj)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/modify-linker-post-type-capability_type/)
 * Hello dear
    I want to change the default “**capability_type**” of the Linker 
   post type. i use the the code below but it’s not work. how can i change default
   capability_type of Linker post type?
 *     ```
       function updateTypes( $post_type, $args ) {
       	if ( 'linker' === $post_type ) {
       		global $wp_post_types;
       		$args->capability_type = "private_post";
       		$wp_post_types[ $post_type ] = $args;
       	}
       }
       add_action( 'registered_post_type', 'updateTypes', 10, 2 );
       ```
   
 * [https://wordpress.org/plugins/linker/](https://wordpress.org/plugins/linker/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Yakir Sitbon](https://wordpress.org/support/users/kingyes/)
 * (@kingyes)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/modify-linker-post-type-capability_type/#post-5871087)
 * Please use this code:
 *     ```
       function linker_update_post_type( $args ) {
           $args['capability_type'] = 'private_post';
           return $args;
       }
   
       add_action( 'linker_register_post_type_args', 'linker_update_post_type' );
       ```
   
 * Good luck 🙂
 *  Thread Starter [saeed shabani](https://wordpress.org/support/users/dnoj/)
 * (@dnoj)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/modify-linker-post-type-capability_type/#post-5871107)
 * thanks

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘modify Linker post type capability_type’ is closed to new replies.

 * ![](https://ps.w.org/linker/assets/icon.svg?rev=980055)
 * [Linker - URL shortener & track outbound link clicks](https://wordpress.org/plugins/linker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/linker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/linker/)
 * [Active Topics](https://wordpress.org/support/plugin/linker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/linker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/linker/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [saeed shabani](https://wordpress.org/support/users/dnoj/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/modify-linker-post-type-capability_type/#post-5871107)
 * Status: resolved