QGIS 2.16 - Installation problem under Windows 10

Just add the next parmater into the function register_post_type, it can be before 'menu_position'parameter. 'show_in_rest' => true

enter image description here

if you're using a plugin to register your posttype you can use the next code:

add_action( 'init', 'add_anuncios_to_json_api', 30 );
function add_anuncios_to_json_api(){
    global $wp_post_types;
    $wp_post_types['anuncio']->show_in_rest = true;
}

after that, you'll be able to list your posts from mydomain.com/wp-json/wp/v2/posttype_slug

in my case: mydomain.com/wp-json/wp/v2/anuncio

you can also register a new base using the next code:

add_action( 'init', 'add_anuncios_to_json_api', 30 );
function add_anuncios_to_json_api(){
    global $wp_post_types;
    $wp_post_types['anuncio']->show_in_rest = true;
    $wp_post_types['anuncio']->rest_base = 'clasi';
    $wp_post_types['anuncio']->rest_controller_class = 'WP_REST_Posts_Controller';
}

just replace anuncio for your post type slug and 'clasi' will be your route. mydomain.com/wp-json/wp/v2/clasi


You can do something like this.

Clear[expr];
q = 1 - Exp[-u/b];
expr[u_?NumericQ] := 
 NIntegrate[
  Log[(1/(2 + b)) (1/(1 - q + q^2)) (q + q^2 + (1 - q)^2 Exp[-u/2])/0.3553], {b, 1, 10}];

Now easy to optimize.

FindMinimum[expr[u], {u, 0, 10}]

{-10.5871, {u -> 1.2105}}


To show custom post types in version 2, you need to add 'show_in_rest' => true in the register_post_type function arguments, then your posts with that custom post type will be available at the endpoint: wp-json/wp/v2/your-custom-post-type.

Source: http://scottbolinger.com/custom-post-types-wp-api-v2/