Support

Home Forums Event Espresso Premium Is EE a Standard Custom Post Type? I can't get it to show up…

Is EE a Standard Custom Post Type? I can't get it to show up…

Posted: August 23, 2014 at 4:10 pm


Richard Austin

August 23, 2014 at 4:10 pm

I figured I might as well just ask. I’m using a plugin called WP-Types that allows you to create your own CPTs and then to also create views and custom fields etc for those CPTs. Well typically I’ve been able to use it with 3rd Party plugins similar to EE and create the custom views (templates)/custom fields I needed, but for whatever reason EE does not show up when I attempt to create new custom fields or templates. So my question is is EE a standard Custom Post Type or is it some weird variation that would cause it to not show up in a plugin that show is typically able to access CPTs? If its some advanced alternative I’ll definitely need to stop digging.

I was simply wanting to create some custom views to display the events and also to be able to add some additional custom fields to my events like Instructor and a field that showed whether the event was an ongoing or not (since EE4 doesn’t allow for ongoing events).


Lorenzo Orlando Caum

  • Support Staff

August 23, 2014 at 5:27 pm

See my reply here:

https://eventespresso.com/topic/how-do-you-do-a-registration-for-a-class-that-is-a-session/#post-113477

add_filter( 'FHEE__EE_Register_CPTs__register_CPT__rewrite', 'my_custom_event_slug', 10, 2 );
    function my_custom_event_slug( $slug, $post_type ) {
    	if ( $post_type == 'espresso_events' ) {
    		$custom_slug = array( 'slug' => 'courses' );
    		return $custom_slug;
    	}
    	return $slug;
    }


Lorenzo


Richard Austin

August 23, 2014 at 10:12 pm

? What was that supposed to do?


Lorenzo Orlando Caum

  • Support Staff

August 24, 2014 at 3:54 pm

If you are already using the ‘events’ slug through an existing plugin, then that code snippet will change it to ‘courses’.


Lorenzo


Josh

  • Support Staff

August 25, 2014 at 9:17 am

Hi Richard,

I can recommend using Advanced Custom Fields for adding your Instructor and Ongoing custom fields. You’ll find that ACF will let you add custom fields to EE’s event manager straight away.

To answer your question, Event Espresso’s event post type is more or less a hybrid WP custom post type. It’s registered as a standard WP custom post type, but extensions are added to allow for functionality that was needed.

The support post ‘Is EE a Standard Custom Post Type? I can't get it to show up…’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso