Embedding custom posts with REST API

Your endpoint is wrong, /wp/v2/posts is just for objects with post_type=”post”. If your custom post type is registered with ‘activity-api’ the endpoint would be /wp/v2/activity-api/11. That’s because it’s the slug you registered in ‘rest_base’ => ‘activity-api’ argument to your post type. Without a custom rest_base argument, the endpoint would be at /wp/v2/st_activity

WP API post__not_in is not working

It is a bit more complicated to achieve. It needs too filters : one to allow the new REST parameter another to set the WP_Query argument add_filter( ‘rest_post_collection_params’, ‘collection_params’, null, 2 ); add_filter( ‘rest_post_query’, ‘query’, null, 2 ); function collection_params( array $query_params, \WP_Post_Type $post_type ): array { $query_params[‘post__not_in’] = [ ‘description’ => ‘Excludes posts.’, ‘type’ … Read more

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