|
|
Can’t expose relationship intermediary posts to WP API
Started by: parisK
in: Toolset Professional Support
Quick solution available
Problem:
The user would like to publish intermediary posts on the WordPress REST API.
Solution:
This needs custom code to make the intermediary post type public in the REST API. This is an example:
add_filter( 'register_post_type_args', 'my_post_type_args', 10, 2 );
function my_post_type_args( $args, $post_type ) {
if ( 'couples' === $post_type ) {
$args['show_in_rest'] = true;
// Optionally customize the rest_base or rest_controller_class
$args['rest_base'] = 'couples';
$args['rest_controller_class'] = 'WP_REST_Posts_Controller';
}
return $args;
}
More about it on this reply https://toolset.com/forums/topic/cant-expose-relationship-intermediary-posts-to-wp-api/#post-2161249
|
|
2 |
5 |
4 years, 7 months ago
parisK
|
|
|
Form block shows up as shortcodes when published
Started by: janeW-2
in: Toolset Professional Support
Quick solution available
Problem:
A form is displayed as shortcode instead of actual form fields.
Solution:
It turns out that the form's code is incorrect. It was not wrapped inside a credform shortcode.
|
|
2 |
5 |
4 years, 8 months ago
janeW-2
|