WordPress REST API – get custom taxonomy category posts

You need to first register rest route for your custom taxonomy i.e. my_portfolio add_filter( ‘register_taxonomy_args’, ‘my_portfolio_taxonomy’, 10, 2 ); function my_portfolio_taxonomy( $args, $taxonomy_name ) { if ( ‘my_portfolio’ === $taxonomy_name ) { $args[‘show_in_rest’] = true; // Optionally customize the rest_base or rest_controller_class $args[‘rest_base’] = ‘my-portfolio’; $args[‘rest_controller_class’] = ‘WP_REST_Terms_Controller’; } return $args; } After that you … Read more

Featured Image and Tags problem

For adding the ID at the end of the URL being generated in yout filter_post_thumbnail function you would use concatenation to append the variable to the end of the URL in the return statement. return'<img src=”https://eur02b.sheltermanager.com/service?account=bp****&method=animal_image&animalid=”‘ . $animalID_REF . ‘”/>’; Also you’ll need to upload the image to the media library and then set it … Read more

Set up WP Authentication from External API

Update: Made a blog post to explain this better 🙂 I was able to do this by WP’s authenticate filter inside a new plugin; most of which is guided by this tutorial by Ben Lobaugh. Major points on the plugin: Make an API call function using cURL (you can get guide codes from Postman upon … Read more

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