Title: [Plugin: Custom Content Type Manager] XMLRPC with CCTM
Last modified: August 20, 2016

---

# [Plugin: Custom Content Type Manager] XMLRPC with CCTM

 *  [hussan](https://wordpress.org/support/users/hussan/)
 * (@hussan)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-custom-content-type-manager-xmlrpc/)
 * Hi, how i can use xmlrpc.php with CCTM? i need add a post in my_custom_type_post.
 * If i set $content[‘type_post’] = ‘my_custom_type_post’ not work.
 * can help me?
 * Thanks
 * [http://wordpress.org/extend/plugins/custom-content-type-manager/](http://wordpress.org/extend/plugins/custom-content-type-manager/)

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

 *  Plugin Contributor [fireproofsocks](https://wordpress.org/support/users/fireproofsocks/)
 * (@fireproofsocks)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-content-type-manager-xmlrpc/#post-2940104)
 * Man, I really don’t know what you’re trying to do here. Where are you putting
   that code? Are you sure it’s supposed to be ‘type_post’ and not ‘post_type’?
 *  Thread Starter [hussan](https://wordpress.org/support/users/hussan/)
 * (@hussan)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-content-type-manager-xmlrpc/#post-2940106)
 * Hi,
 * i am trying add a custom post with xmlrpc , can i do it?
 * and, yes is post_type..
 * thanks
 *  Plugin Contributor [fireproofsocks](https://wordpress.org/support/users/fireproofsocks/)
 * (@fireproofsocks)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-content-type-manager-xmlrpc/#post-2940108)
 * Where are you putting that code?
 *  Thread Starter [hussan](https://wordpress.org/support/users/hussan/)
 * (@hussan)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-content-type-manager-xmlrpc/#post-2940117)
 * Hi,
 * i have a custom type called mynews and i am trying add a post with xmlrpc.
 * here is the code:
 *     ```
       <?
       		require("xmlrpc/class-IXR.php");
               $client = new IXR_Client('http://mysite.com/xmlrpc.php');
   
               $USER = 'user';
               $PASS = 'pass';
   
               $content['title'] = 'Test title '.mt_rand();
               $content['categories'] = array("");
       	$content['post_type'] = 'mynews';
           //  $content['custom_fields'] = array( array('key' => 'post_type','value'=>'downloadimpresa') );
               $content['description'] = '<p>Lorem ipsum dolor sit amet</p>';
   
               $content['mt_keywords'] = array('foo','bar');
   
               if (!$client->query('metaWeblog.newPost','', $USER,$PASS, $content, true))
               {
                   die( 'Error while creating a new post ' . $client->getErrorCode() ." : ". $client->getErrorMessage());
               }
               $ID =  $client->getResponse();
   
               if($ID)
               {
                   echo 'Post published with ID:#'.$ID;
               }
       ?>
       ```
   
 * when i try execute this code i have an error:
    Error while creating a new post
   401 : invalid post type
 * Can help me?
 * thanks
 *  Plugin Contributor [fireproofsocks](https://wordpress.org/support/users/fireproofsocks/)
 * (@fireproofsocks)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-content-type-manager-xmlrpc/#post-2940120)
 * Sounds like it might be bug with WordPress’ implementation of xmlrpc. I presume
   you’re saving this code at the root of your site somewhere?
 *  Thread Starter [hussan](https://wordpress.org/support/users/hussan/)
 * (@hussan)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-content-type-manager-xmlrpc/#post-2940121)
 * Hi,
 * no, this code isnt in root of wordpress instalation.
 * thanks
 *  Plugin Contributor [fireproofsocks](https://wordpress.org/support/users/fireproofsocks/)
 * (@fireproofsocks)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-content-type-manager-xmlrpc/#post-2940122)
 * To repeat myself:
 * `Where are you putting that code?`
 * Thanks. It’s impossible to offer significant feedback without detailed information.
 *  Thread Starter [hussan](https://wordpress.org/support/users/hussan/)
 * (@hussan)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-content-type-manager-xmlrpc/#post-2940123)
 * hi,
 * i put that code in /root_wordpress/directory/test.php
 * thanks
 *  Plugin Contributor [fireproofsocks](https://wordpress.org/support/users/fireproofsocks/)
 * (@fireproofsocks)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-content-type-manager-xmlrpc/#post-2940137)
 * Looks like it’s a bug in WordPress : [http://core.trac.wordpress.org/ticket/18429](http://core.trac.wordpress.org/ticket/18429)
   and [http://core.trac.wordpress.org/ticket/16476](http://core.trac.wordpress.org/ticket/16476)
   Hopefully the patch will be released soon.

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

The topic ‘[Plugin: Custom Content Type Manager] XMLRPC with CCTM’ is closed to 
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-content-type-manager_c9c790.
   svg)
 * [Custom Content Type Manager](https://wordpress.org/plugins/custom-content-type-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-content-type-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-content-type-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-content-type-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-content-type-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-content-type-manager/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [fireproofsocks](https://wordpress.org/support/users/fireproofsocks/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-content-type-manager-xmlrpc/#post-2940137)
 * Status: not resolved