Authenticated request to WP REST API V2 returning 403 error on /users/me [closed]

Closed. This question is off-topic. It is not currently accepting answers. Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third party plugins and themes are off topic, they are better asked about at their developers’ support routes. Closed 6 … Read more

How do I perform a “get” call to an external API, and then display the JSON results on a page in my WordPress site?

A client has an external API that is storing all member info. My tasks are: a.) Create a ‘Member Profile Search’ page on his site, where users can search for members using certain keywords. b.) When the submit button on the search page is clicked, perform a “get” call to the external API, that will … Read more

Sharing templates with the JSON API?

Is there any way to share ‘templates’ between JS and WordPress? For instance, this sort of modest seat-of-the-pants templating feels ok: var AJAXSuccessFunc = function(data){ // calling this on ajax.success var title = data.page.title; var content = data.page.content; var string = ‘<h1>’ + title + ‘</h1>’ + content; targetDiv.html(string).fadeIn(); } But given that content might … Read more

Add external js file to footer with id

I know how to add custom/external js but i dont know how to pass js id also. i am using it as: wp_register_script( ‘validation’, ‘https://www.asd.in/script.php?id=3ff00a469474bbe71a9218a7f0377518’, array( ‘jquery’ ) ); wp_enqueue_script( ‘validation’ ); but I need output in footer like: <script type=”text/javascript” id=”3ff00a469474bbe71a9218a7f0377518″ src=”https://www.asd.in/script.php?id=3ff00a469474bbe71a9218a7f0377518″></script> Note: ID 3ff00a469474bbe71a9218a7f0377518 most show in output 1 Answer 1 You can … Read more

How pull wordpress blog data using Blogger API using python

WordPress mentioned that it supports Blogger API (link). So, can anyone tell me how to use Blogger API (using python) v3 to pull wordpress public blogs data. Or, is there any wordpress API to pull public data from its blogs? (Lang: Python). Any useful documentation that clearly explains the procedure would also be appreciated. 1 … Read more

Request object for validate_callback

I’m trying to define a new REST Api endpoint based on WP REST API (version 2) and have question relating to what arguments are available to the validate_callback and sanitize_callback. Is the Request object made available for these callbacks? For example: add_action( ‘rest_api_init’, function () { register_rest_route( ‘myplugin/v1’, ‘/author/(?P<id>\d+)’, array( ‘methods’ => ‘GET’, ‘callback’ => … Read more