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

Outputting HTML elements through WP-API

I realised my mistake. The following line in my functions.php: ~remove_filter(‘the_content’, ‘wpautop’); This was in the WordPress underscore empty template which I started the project with, and was removing html from the content.

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