retrieving external api data and updating existing custom post

Use the ACF field name, not the field key. This works: update_field(‘forecast_link’, $json_data[‘properties’][‘forecast’], $post_id); update_post_meta($post_id, ‘forecast_link’, $json_data[‘properties’][‘forecast’]); Use array keys to access nested data as needed. Reference (ACF Docs): https://www.advancedcustomfields.com/resources/update_field/

Correct filter hook to modify the output of a custom taxonomy API call?

The rest_grammar_terms_query hook should normally fire, but it’s possible that when registering the custom taxonomy or defining the API endpoint, that hook wasn’t applied or the wrong namespace was used. One approach would be to try using register_rest_field() or the rest_prepare_<taxonomy> filter. For example, rest_prepare_grammar_terms can be used to modify the API response of your … Read more

trying to send request-body to rest_api custom csp-endpoint

For sure, you are missing required argument permission_callback If you want this endpoint to be public you add it like this: ‘permission_callback’ => ‘__return_true’ It is tricky, because documentation do not tell you directly that this one is required. From version 5.5 you have only debug note that this argument is required. Also in your … Read more

Fetch a single post from a list of posts using the REST API

To help you, we need to know what the “my_post” action looks like in your code. Somewhere in your code, there must be an add_route with “my_post.” Can you show us what it looks like? add_route(‘my_post’, array( … )); By default, you can filter your posts in WordPress using the following route: ?rest_route=/wp/v2/posts/${POST_ID}.

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