We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can we add number of view to REST API wp-json/wp/v2/posts
wp-json/wp/v2/posts
The text was updated successfully, but these errors were encountered:
It's available in the separate request, but I think we can also extend the default post object.
Sorry, something went wrong.
yep. currently, i added this command line // Posts register_rest_field( 'post', 'number_of_views', array( 'get_callback' => array( $this, 'wp_api_number_of_views' ), 'schema' => null, ) );
// Posts register_rest_field( 'post', 'number_of_views', array( 'get_callback' => array( $this, 'wp_api_number_of_views' ), 'schema' => null, ) );
How it is available in separate request? Can you provide an example?
No branches or pull requests
Can we add number of view to REST API
wp-json/wp/v2/posts
The text was updated successfully, but these errors were encountered: