最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to add post reference field to a plugin?

programmeradmin3浏览0评论

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
Add a comment  | 

1 Answer 1

Reset to default 0

You 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.

发布评论

评论列表(0)

  1. 暂无评论