{"id":30636,"date":"2014-07-16T00:24:58","date_gmt":"2014-07-16T00:24:58","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/acf-dynamic-choices\/"},"modified":"2014-07-16T00:28:40","modified_gmt":"2014-07-16T00:28:40","slug":"acf-dynamic-choices","status":"publish","type":"plugin","link":"https:\/\/lmo.wordpress.org\/plugins\/acf-dynamic-choices\/","author":13943291,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":".5","stable_tag":"0.5","tested":"3.9.40","requires":"3.0.1","requires_php":"","requires_plugins":"","header_name":"Advanced Custom Fields Dynamic Choices","header_author":"Eli Gassert","header_description":"","assets_banners_color":"","last_updated":"2014-07-16 00:28:40","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/steppingback.com\/project\/acf-dynamic-choices\/","header_author_uri":"http:\/\/steppingback.com","rating":5,"author_block_rating":0,"active_installs":10,"downloads":4389,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"1"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.5"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[2211,1506,1626,1625],"plugin_category":[59],"plugin_contributors":[93873],"plugin_business_model":[],"class_list":["post-30636","plugin","type-plugin","status-publish","hentry","plugin_tags-acf","plugin_tags-dynamic","plugin_tags-query","plugin_tags-sql","plugin_category-utilities-and-tools","plugin_contributors-grexican","plugin_committers-grexican"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/acf-dynamic-choices.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>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.<\/p>\n\n<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 <code>%%QUERY%%<\/code> choice that will tell this plugin to load choices dynamically from the database.<\/p>\n\n<p>An example on how to list users, setting the <code>id<\/code> as the value, would look like this:<\/p>\n\n<pre><code>%%QUERY%% : SELECT user_nicename AS text, id AS value FROM wp_users\n<\/code><\/pre>\n\n<h3>Arbitrary section<\/h3>\n\n<!--section=installation-->\n<ol>\n<li>Upload <code>acf-dynamic-choices<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory. Alternatively, install the <code>zip<\/code> through the WordPress Plugins installer.<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>Place a query in your ACF choices box in this form: <code>%%QUERY%% : SELECT field1 AS text, field2 AS value FROM ....<\/code><\/li>\n<li>Browse to a Post or the Options Page where you just added the dynamic query and ensure that the choices are properly being populated.<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>.5<\/h4>\n\n<ul>\n<li>Initial public release<\/li>\n<\/ul>","raw_excerpt":"Advanced Custom Fields plugin to allow for dynamic choices (through SQL queries)","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/30636","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=30636"}],"author":[{"embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/grexican"}],"wp:attachment":[{"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=30636"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=30636"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=30636"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=30636"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=30636"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=30636"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}