This plugin hasn’t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Custom fields to api


Puts all code from Custom fields to api.


  1. Unzip and upload the aliens-sci directory to /wp-content/plugins/.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress


requires you to add the following to your functions.php file to allow filtering on the WP-API by meta_key

add_filter( ‘json_query_vars’, ‘filterJsonQueryVars’ );

function filterJsonQueryVars( $vars ) { $vars[] = ‘meta_key’; return $vars; }

Once you added that, you can filter using these arguments[orderby]=meta_value_num&filter[meta_key]=order&filter[order]=ASC


filter[orderby]: Either meta_value or meta_value_num depending on whether you’re filtering on an alphanumeric value or a numeric value filter[meta_key]: The key you want to filter on, this is the name of the ACF field filter[order]: The order to receive the data in, ASC or DESC

See the file.

How can I filter posts on a custom field?

Contributors & Developers

“Custom fields to api” is open source software. The following people have contributed to this plugin.


Translate “Custom fields to api” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • Initial release.


  • Bug fixes and performance improvements.