Skip Navigation

[Resolved] The Events Calendar/Modern Tribe Custom Post Types

This support ticket is created 8 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 2.09 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 6 replies, has 2 voices.

Last updated by frankN-3 8 years ago.

Assisted by: Shane.

Author
Posts
#391101
Untitled-1.png

I am trying to:Create a Parent cpt in Toolset with a child cpt created by The Events Calendar

I visited this URL: Toolset CPT post edit page

I expected to see: ddlist of TEC created cpt "Events"

Instead, I got: no ddlist

The Events calendar plugin creates cpt Events and Venues. I used Toolset to create a cpt Concert Series for use as a parent to both Venues and Events, both of which show and can be set up as children when creating the concert Series cpt.

When going to an Event Post I can select a "Concert Series" to be used as a parent from a ddlist.

When going to a Concert Series post neither Events or Venues populate ddlists as expected.

The following shows how the 2 TEC post types are registered


/**
		 * Args for the event post type
		 * @var array
		 */
		protected $postTypeArgs = array(
			'public'          => true,
			'rewrite'         => array( 'slug' => 'event', 'with_front' => false ),
			'menu_position'   => 6,
			'supports'        => array(
				'title',
				'editor',
				'excerpt',
				'author',
				'thumbnail',
				'custom-fields',
				'comments',
			),
			'taxonomies'      => array( 'post_tag' ),
			'capability_type' => array( 'tribe_event', 'tribe_events' ),
			'map_meta_cap'    => true,
			'has_archive'     => true,
		);

		/**
		 * Args for venue post type
		 * @var array
		 */
		public $postVenueTypeArgs = array(
			'public'              => true,
			'rewrite'             => array( 'slug' => 'venue', 'with_front' => false ),
			'show_ui'             => true,
			'show_in_menu'        => 0,
			'supports'            => array( 'title', 'editor' ),
			'capability_type'     => array( 'tribe_venue', 'tribe_venues' ),
			'map_meta_cap'        => true,
			'exclude_from_search' => false,
		);

		protected $taxonomyLabels;

#391154

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Frank,

Thank you for contacting our support forum.

From your post I gather that you want to create a Parent post Type for Events and Venues.

Please let me know if this is the intention.

Thanks,
Shane

#391180
E3.png

Thanks. Yes that is correct. I created the parent and as seen in the image both Events and Venues are select able items to be children. I did this.

When trying to associate children to the parent post is when I have the issue. I was looking for 2 pre populated dropdowns one with all Events and one with all Venues to select from. I get no dropdowns, instead I get prompted to create a new event. I see now that is working correctly as in the tutorial. There sis no dropdawn.

I do still have a problem here. When an event OR venue (child) is either already associated with a Concert Series (parent) or I attempt to create a new child on the Parent page the Post Title is not available, either populated or as an empty textbox to fill in

#391394

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screen Shot 2016-04-22 at 9.51.41 AM.png

Hi Frank,

When you create a child post you must first need to save the post before you can associate it with a parent.

I tried this and I was able to see the dropdown for the Parent posts See Screenshot.

This screenshot is actually from my Events post type that was created by the events calendar plugin.

#391419
step2.png
step1.png
posttype.png

That is exactly what I'm looking for but not what I get. On the parent page after saving it I attempt to add a child and do not get a dropdown. I get as step1.png shows. After I click add event new event button I get step2.png

Attached also is the Post type creation page

#391465

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Frank,

The images you sent me are of the Parent CPT. It's actually displaying the correct information. The only thing you can do from the Parent CPT is create a child post from the parent. You wont get a dropdown to select the child posts to be attached to that Parent.

Only child posts you are able to select the Parent. So if you want to assign a child to a parent then you need to go to the Child post and then select the parent.

Please let me know if I was able to answer you correctly based on your concerns.

Thanks,
Shane

#391490

Got it thanks

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.