No Drop-down after adding register_post_type ('presenters') to events form

Home Forums Calendar Products Events Calendar PRO No Drop-down after adding register_post_type ('presenters') to events form

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1366205
    Roberto
    Participant

    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.

    #1367289
    Andras
    Keymaster

    Hi 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,
    Andras

    #1381615
    Support Droid
    Keymaster

    Hey 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

    #1384358
    Andras
    Keymaster

    Ciao 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,
    Andras

    #1401309
    Support Droid
    Keymaster

    Hey 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

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘No Drop-down after adding register_post_type ('presenters') to events form’ is closed to new replies.