Skip Navigation

[Resolved] Dropdown list of custom post title with their id's as values

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 9 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 -
- - - - - - -

Supporter timezone: America/Sao_Paulo (GMT-03:00)

This topic contains 5 replies, has 2 voices.

Last updated by przemyslawP 9 years, 9 months ago.

Assisted by: Adriano.

Author
Posts
#231479

Hi there,
I have another question to you: how could I make a custom dropdown select list with options from a specific WP_Query or sth? I.E. I have custom post type "course" and want to list all the courses as a select list in another custom post type custom field. Is it possible? Some kind of hack in functions.php maybe?

Hope you know the ansswer!
Przemek

#231514

Dear przemyslaw,

No, unfortunately we don't have an API for Types yet. So, you are not allowed to add custom fields using PHP. You can just use the available ones.

Please let me know if you are satisfied with my answer and if I can help you with any other related question.

#231516

I can't even add options to an existing custom field?

#231525

I just thought out a way of doing it in clear wordpress with adding custom metabox and few hooks... but i thought that maybe there is a hook for types to point a field which should show my desired options... if not then I'll do it the other way then.

#231575

Dear przemyslaw,

Sorry, but unfortunately there is no such hook in Types. We have some hooks in other products like Views and CRED, but nothing in Types for now, sorry.

Please let me know if you are satisfied with my answer and if I can help you with any other related question.

#231600

Ok I've managed to write a working hook for two custom dropdowns with two different custom posts types in them and add those fields in a metabox to a third custom post type. All working great so if anyone would need such a thing please contact me 🙂

The forum ‘Types Community Support’ is closed to new topics and replies.

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