parisK
Fils de soutien créés au cours des 30 derniers jours : 0
Sujets de forum favoris
This user has no favorite topics.
Sujets de forum créés
| Status | Topic | Supporter | Voix | Publications | Nouveauté |
|---|---|---|---|---|---|
|
Update custom fields using wordpress api
Commencé par : parisK in: Toolset Professional Support |
2 | 2 | Il y a 3 years, 4 months | ||
|
Add Toolset view on existing template
Commencé par : parisK in: Toolset Professional Support |
|
3 | 4 | Il y a 4 years, 3 months | |
|
Retrieve all child posts for a specific parent in relationship
Commencé par : parisK in: Toolset Professional Support |
|
2 | 3 | Il y a 4 years, 6 months | |
|
Expose repeated field group in WP REST API
Commencé par : parisK in: Toolset Professional Support |
|
2 | 3 | Il y a 4 years, 9 months | |
|
POST a many-to-many relationship CPT through WP API
Commencé par : parisK in: Toolset Professional Support |
|
2 | 3 | Il y a 4 years, 9 months | |
|
Can’t expose relationship intermediary posts to WP API
Commencé par : parisK
in: Toolset Professional Support
Problem: Solution:
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 | Il y a 4 years, 9 months | |
|
Create a view withe repeatable group
Commencé par : parisK in: Toolset Professional Support |
|
2 | 6 | Il y a 4 years, 9 months |