Deze plugin is niet getest met de laatste drie grote versies van WordPress. Mogelijk wordt het niet meer onderhouden of ondersteund. Er kunnen ook compatibiliteitsproblemen ontstaan wanneer het wordt gebruikt met recentere versies van WordPress.

Custom fields to api

Beschrijving

Puts all code from Custom fields to api.

Installatie

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

FAQ

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

dowmian.com/wp-json/posts?filter[orderby]=meta_value_num&filter[meta_key]=order&filter[order]=ASC

Usage

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 CONTRIBUTING.md file.

How can I filter posts on a custom field?

Beoordelingen

Er zijn geen beoordelingen voor deze plugin.

Bijdragers & ontwikkelaars

“Custom fields to api” is open source software. De volgende personen hebben bijgedragen aan deze plugin.

Bijdragers

Vertaal “Custom fields to api” naar jouw taal.

Interesse in de ontwikkeling?

Bekijk de code, haal de SVN repository op, of abonneer je op het ontwikkellog via RSS.

Changelog

1.0.0

  • Initial release.

1.0.1

  • Bug fixes and performance improvements.