Title: Help connecting custom wordpress object
Last modified: January 20, 2021

---

# Help connecting custom wordpress object

 *  Resolved [leaddeveloper](https://wordpress.org/support/users/leaddeveloper/)
 * (@leaddeveloper)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/help-connecting-custom-wordpress-object/)
 * I have added a custom object to the wordpress.php file. I used the below method
 *     ```
       add_filter( 'object_sync_for_salesforce_add_more_wordpress_types', 'add_more_types', 10, 1 );
       			function add_more_types( $wordpress_object_types ) {
       				$wordpress_object_types[] = 'foo'; // this will add to the existing types.
       				return $wordpress_object_types;
       			}
       ```
   
 * But my custom object is from another plugin and this particular plugin does not
   have a meta table created for the particular table i want to pick data from. 
   I need help in connecting the fields from this table without requiring me to 
   enter table meta info in the `public function get_wordpress_table_structure( 
   $object_type ){...}` section of the code

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

 *  Plugin Author [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * (@jonathanstegall)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/help-connecting-custom-wordpress-object/#post-13933221)
 * First of all, you shouldn’t add code to the wordpress.php file unless you want
   to submit a pull request to modify the plugin. The reason is that it could be
   overwritten when the plugin is updated. You want to do that kind of work in your
   own plugin, or in your theme’s functions.php file.
 * Second, if you’ve added your custom type, you should use the `object_sync_for_salesforce_wordpress_object_fields`
   filter to tell the plugin what the fields for your custom object are. It doesn’t
   require that there be a meta table. It does require that there are WordPress 
   functions available for it to call to create, read, update, and delete data in
   the table where the fields are. You can read documentation about that filter 
   here: [https://github.com/MinnPost/object-sync-for-salesforce/blob/master/docs/extending-mapping-options.md](https://github.com/MinnPost/object-sync-for-salesforce/blob/master/docs/extending-mapping-options.md)
 *  Thread Starter [leaddeveloper](https://wordpress.org/support/users/leaddeveloper/)
 * (@leaddeveloper)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/help-connecting-custom-wordpress-object/#post-13936452)
 * Hello [@jonathanstegall](https://wordpress.org/support/users/jonathanstegall/),
 * thank you for the response. We would very much appreciate if this something you
   can do, to have you help us with our particular requirements in this case. We
   would be more than happy to facilitate the time and effort you would put into
   this.
 * please kindly advise

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

The topic ‘Help connecting custom wordpress object’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/object-sync-for-salesforce.svg)
 * [Object Sync for Salesforce](https://wordpress.org/plugins/object-sync-for-salesforce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/object-sync-for-salesforce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/object-sync-for-salesforce/)
 * [Active Topics](https://wordpress.org/support/plugin/object-sync-for-salesforce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/object-sync-for-salesforce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/object-sync-for-salesforce/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [leaddeveloper](https://wordpress.org/support/users/leaddeveloper/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/help-connecting-custom-wordpress-object/#post-13936452)
 * Status: resolved