admin管理员组文章数量:1389749
I am using the example at populate dropdown wordpress form from database custom table.
I understand the code but I do not know how to execute it. This code should be executed whenever a new Post is started. I am trying to populate two dropdowns.
Edit: I have given this another think. I think the code should go in the Front Page. Then it is called only when the front page shows. Thanks...Dan'l
I am using the example at populate dropdown wordpress form from database custom table.
I understand the code but I do not know how to execute it. This code should be executed whenever a new Post is started. I am trying to populate two dropdowns.
Edit: I have given this another think. I think the code should go in the Front Page. Then it is called only when the front page shows. Thanks...Dan'l
Share Improve this question edited Mar 9, 2020 at 15:13 GreatDayDan asked Mar 9, 2020 at 12:22 GreatDayDanGreatDayDan 153 bronze badges 1- You would put the code for the dropdown in the place you want to put the dropdown. However, it sounds as if you have found the final piece of a puzzle without identifying the foundations. When you say whenever a new post is started, what do you mean? That could mean a number of things, in a number of places – Tom J Nowell ♦ Commented Mar 9, 2020 at 12:56
1 Answer
Reset to default 0Thing is, the code can go to many places. For me, personally, is to develop own plugin and add code there.
If you need to something execute at certain point, use add_action
hook.
From what you wrote, this question might be helpful: add_action hook for completely new post?
本文标签: custom fieldWhere does php code to load data go
版权声明:本文标题:custom field - Where does php code to load data go? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744684392a2619609.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论