Home › Forums › Calendar Products › Events Calendar PRO › No Drop-down after adding register_post_type ('presenters') to events form
- This topic has 5 replies, 4 voices, and was last updated 6 years, 4 months ago by Support Droid.
-
AuthorPosts
-
October 19, 2017 at 3:23 pm #1366205RobertoParticipant
I used the following discussion https://theeventscalendar.com/support/forums/topic/custom-dropdown-field-with-links/
to add a new post type called Presenter, but it does not show it as a drop-down like Presenters.I added this to the function.php file:
register_post_type( ‘presenters’, array(
‘labels’ => array(
‘name’ => ‘Presenters’,
‘singular_name’ => ‘Presenter’,
‘singular_name_lowercase’ => ‘presenter’,
‘plural_name_lowercase’ => ‘presenters’
),
‘public’ => true
));function tribe_link_instructors_to_events() {
tribe_register_linked_post_type( ‘presenters’, array(
‘singular_name’ => ‘Presenter’,
‘singular_name_lowercase’ => ‘presenter’,
‘allow_multiple’ => true,
‘allow_creation’ => true
) );
}
add_action( ‘init’, ‘tribe_link_instructors_to_events’ );From the photo upload, you can see that the Organizer field with the ability to choose from already entered organizers.
Second issue is that even if I can only get the text-box, when I go to save it doesn’t keep the data.
October 22, 2017 at 7:59 am #1367289AndrasKeymasterHi Roberto,
Thanks for reaching out!
We have switched to using select2 for the dropdowns and I believe this change is not yet reflected in the documentation. I will try to check with the team what needs to be done to get it working and I’ll get back to you as soon as I have something. I ask for a bit of patience.
Thanks and cheers,
AndrasNovember 13, 2017 at 8:35 am #1381615Support DroidKeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support TeamNovember 16, 2017 at 2:45 am #1384358AndrasKeymasterCiao Roberto,
I’m sorry for only getting back to you now. We are being hammered in the forums at the moment, and everything takes a bit longer.
I managed to re-look at your code and I think I found the issue. In your code you have single quotes in the array where you don’t need them.
Here is the adjusted code that I tested on my site and it worked. Let me know if this also works for you.
register_post_type( 'instructors', array(
'labels' => array(
'name' => 'Instructors',
'singular_name' => 'Instructor',
'singular_name_lowercase' => 'instructor',
'plural_name_lowercase' => 'instructors'
),
'public' => true
));function tribe_link_instructors_to_events() {
tribe_register_linked_post_type(
'instructors',
array(
singular_name => 'Presenter',
singular_name_lowercase => 'presenter',
allow_multiple => true,
allow_creation => true
)
);
}add_action( 'init', 'tribe_link_instructors_to_events' );
Cheers,
AndrasDecember 8, 2017 at 8:35 am #1401309Support DroidKeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘No Drop-down after adding register_post_type ('presenters') to events form’ is closed to new replies.