Rest API does not work after changing WordPress Theme

I manage to solved it by adding this code (at the bottom) to the YOUR BLOG THEMES my path : wp-content/themes/MYWPTHEME/function.php function ws_register_images_field() { register_rest_field( ‘post’, ‘images’, array( ‘get_callback’ => ‘ws_get_images_urls’, ‘update_callback’ => null, ‘schema’ => null, ) ); } add_action( ‘rest_api_init’, ‘ws_register_images_field’ ); function ws_get_images_urls( $object, $field_name, $request ) { $medium = wp_get_attachment_image_src( get_post_thumbnail_id( … Read more

How to change WordPress api v2

Take a look at this: https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-custom-endpoints/ You should write a plugin to create and mantain extra taxonomies (shop, hospitals, like you said) and manage the custom API endpoints.

WordPress REST API not displaying all information

The link doesn’t give any information. site shows blank page the rest api returns authentication error. WP Search API is working pretty well for post post-type as a default. When you publish the posts, it takes a couple seconds to admit them in the rest search results. In my past experience, Searching didn’t work due … Read more

AJAX requests within templates

Security through obscurity isn’t a good pattern to follow. You have to have a URL to make XHR or JSONP calls. Anyone who knows anything about searching the DOM using developer tools, Firebug, etc… can easily find your remote script URL. To me, this is the wrong question to ask. The more relevant question to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)