Title: Map Component with Custom Post Types
Last modified: August 21, 2016

---

# Map Component with Custom Post Types

 *  Resolved [summerchilde](https://wordpress.org/support/users/summerchilde/)
 * (@summerchilde)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/map-component-with-custom-post-types/)
 * This is similar to an earlier post. I’ve created a custom post type plugin to
   use for stories and the Map Component meta box doesn’t show up. I’ve figured 
   out how to add my post type to component-map.php of the Aesop plugin using ‘pages’
   => array(‘post’,’page’,’story’), on line 53. While this works I would rather 
   not edit the Aesop Store Engine plugin.
 * How can I get the meta box to show up in the custom post type’s editor page? 
   The other post here ([http://wordpress.org/support/topic/custom-post-types-125?replies=5](http://wordpress.org/support/topic/custom-post-types-125?replies=5))
   says it can be done at the theme level. I’d rather do this within my custom post
   type plugin so it is theme independent.
 * [https://wordpress.org/plugins/aesop-story-engine/](https://wordpress.org/plugins/aesop-story-engine/)

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

 *  Plugin Author [Nick Haskins](https://wordpress.org/support/users/nphaskins/)
 * (@nphaskins)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/map-component-with-custom-post-types/#post-4722926)
 * Yeah just copy that function and paste it into your plugin, and rename the function
   and action. You can hook into the metabox class easily within Aesop; here’s how;
 * [https://github.com/humanmade/Custom-Meta-Boxes/wiki/Create-a-Meta-Box](https://github.com/humanmade/Custom-Meta-Boxes/wiki/Create-a-Meta-Box)
 * Just keep the meta value names the same and should work out well. I’ll work on
   a way to make this editable at some point.
 *  Thread Starter [summerchilde](https://wordpress.org/support/users/summerchilde/)
 * (@summerchilde)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/map-component-with-custom-post-types/#post-4722932)
 * Thanks for the quick reply!
 * So, just so I’m reading this right, copy the whole of component-map.php over 
   and rename the parts?
 *  Plugin Author [Nick Haskins](https://wordpress.org/support/users/nphaskins/)
 * (@nphaskins)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/map-component-with-custom-post-types/#post-4722936)
 * [https://github.com/bearded-avenger/aesop-core/blob/master/admin/includes/components/component-map.php#L13](https://github.com/bearded-avenger/aesop-core/blob/master/admin/includes/components/component-map.php#L13)
 * You’ll need that function, along with the filter above it.
 * We’re just hooking into that existing metabox class. You could copy that function
   and filter and use in your plugin to create metaboxes for your custom post type.
   As long as you don’t change the ‘id’, the map will pick up the post meta for 
   that particular custom post type entry.
 * Make sense?
 *  Thread Starter [summerchilde](https://wordpress.org/support/users/summerchilde/)
 * (@summerchilde)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/map-component-with-custom-post-types/#post-4722942)
 * Yes, thanks. I will give it a try now.
 *  Thread Starter [summerchilde](https://wordpress.org/support/users/summerchilde/)
 * (@summerchilde)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/map-component-with-custom-post-types/#post-4722962)
 * Just wanted to let you know that it totally worked. Thanks!
 *  Plugin Author [Nick Haskins](https://wordpress.org/support/users/nphaskins/)
 * (@nphaskins)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/map-component-with-custom-post-types/#post-4722963)
 * 😉
 * If you need anything else just let me know.

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

The topic ‘Map Component with Custom Post Types’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/aesop-story-engine_252422.svg)
 * [Aesop Story Engine](https://wordpress.org/plugins/aesop-story-engine/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/aesop-story-engine/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/aesop-story-engine/)
 * [Active Topics](https://wordpress.org/support/plugin/aesop-story-engine/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/aesop-story-engine/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/aesop-story-engine/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Nick Haskins](https://wordpress.org/support/users/nphaskins/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/map-component-with-custom-post-types/#post-4722963)
 * Status: resolved