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

database - Fill custom select field with pagespost titles

programmeradmin1浏览0评论

I'm just getting into the world of SAGE development and at the same time, I'm using the Advanced Custom Fields plugin.

Let's say, that we have created two custom post types (Professors, Lessons). Each post type has its own custom fields. At some point, however, I would like to add a new custom field to the Professors' post type that will be called Lessons and will be a selectable list of all the lessons that one created in the Lessons post type. So In that way, you can connect each professor with the corresponding lessons of his/hers.

So far I couldn't find a way to pre-fill/pre-define a custom select field with values taken from the database (e.g post titles). Is there a different way to achieve this?

I'm just getting into the world of SAGE development and at the same time, I'm using the Advanced Custom Fields plugin.

Let's say, that we have created two custom post types (Professors, Lessons). Each post type has its own custom fields. At some point, however, I would like to add a new custom field to the Professors' post type that will be called Lessons and will be a selectable list of all the lessons that one created in the Lessons post type. So In that way, you can connect each professor with the corresponding lessons of his/hers.

So far I couldn't find a way to pre-fill/pre-define a custom select field with values taken from the database (e.g post titles). Is there a different way to achieve this?

Share Improve this question asked Apr 29, 2020 at 8:08 J. DoeJ. Doe 1032 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

You could use post object or post link as your custom field type. https://www.advancedcustomfields/resources/post-object/

发布评论

评论列表(0)

  1. 暂无评论