I am trying to add a field to a custom post type through a plugin I am creating.
One of the fields I need is a post reference / link to field. Any ideas on how to do this?
In the WYSIWYG when you are adding a link, there is an area that lists existing posts ... I am looking to add this functionality to a custom field / meta box.
Any help is greatly appreciated.
I am trying to add a field to a custom post type through a plugin I am creating.
One of the fields I need is a post reference / link to field. Any ideas on how to do this?
In the WYSIWYG when you are adding a link, there is an area that lists existing posts ... I am looking to add this functionality to a custom field / meta box.
Any help is greatly appreciated.
Share Improve this question edited Jun 2, 2015 at 2:48 Matthew Woodard asked Jun 2, 2015 at 1:46 Matthew WoodardMatthew Woodard 2263 silver badges14 bronze badges 3- I do not understand the question – s_ha_dum Commented Jun 2, 2015 at 2:22
- @s_ha_dum In the WYSIWYG when you are adding a link, there is an area that lists existing posts ... I am looking to add this functionality to a custom field / meta box. – Matthew Woodard Commented Jun 2, 2015 at 2:34
- Aha! That makes sense! Please edit that into the question itself. – s_ha_dum Commented Jun 2, 2015 at 2:47
1 Answer
Reset to default 0You can create something similar to WYSIWYG link dialog by generating traditional HTML SELECT with OPTIONs as post items, and then make it more interactive (searchable,...) with Chosen jQuery library. It's not as precise solution as that in editor, but it can be enough for you.