If you’ve ever needed your ACF choices to be dynamically generated by a SQL query, this plugin will help you get the job done.
如果您曾经需要通过SQL查询动态生成ACF选项,则此插件将帮助您完成工作。 p>
You can mix and match static choices with dynamic, SQL-based choices by placing as many regular choices in the list as you'd like, followed by the special %%QUERY%%
choice that
您可以通过在列表中放置任意数量的常规选项,然后再添加特殊的 %% QUERY %% code>选项,将静态选项与基于SQL的动态选项混合和匹配。will tell this plugin to load choices dynamically from the database.
会告诉该插件从数据库动态加载选择。 p>
An example on how to list users, setting the id
as the value, would look like this:
关于如何列出用户的示例,将 id code>设置为值,将看起来像这样: p>%%QUERY%% : SELECT user_nicename AS text, id AS value FROM wp_users %% QUERY %%:选择user_nicename AS文本,id AS值来自wp_users
code> pre>
Arbitrary section
任意部分 h3>