-
Notifications
You must be signed in to change notification settings - Fork 0
/
readme.txt
39 lines (24 loc) · 1.45 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
=== ACF Dynamic Choices ===
Contributors: grexican
Tags: acf, dynamic, sql, query
Requires at least: 3.0.1
Tested up to: 3.9.1
Stable tag: .5
License: MIT
License URI: https://raw.githubusercontent.com/grexican/acf-dynamic-choices/master/LICENSE
Advanced Custom Fields plugin to allow for dynamic choices (through SQL queries)
== Description ==
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.
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 will tell this plugin to load choices dynamically from the database.
An example on how to list users, setting the `id` as the value, would look like this:
`%%QUERY%% : SELECT user_nicename AS text, id AS value FROM wp_users`
== Installation ==
1. Upload `acf-dynamic-choices` folder to the `/wp-content/plugins/` directory. Alternatively, install the `zip` through the WordPress Plugins installer.
1. Activate the plugin through the 'Plugins' menu in WordPress
1. Place a query in your ACF choices box in this form: `%%QUERY%% : SELECT field1 AS text, field2 AS value FROM ....`
1. Browse to a Post or the Options Page where you just added the dynamic query and ensure that the choices are properly being populated.
== Frequently Asked Questions ==
== Changelog ==
= .5 =
* Initial public release
== Arbitrary section ==