Full documentation about $args for register_rest_route?

full documentation listing all of the possible keys you can provide for $args when calling register_rest_route, just as you have it with register_post_type register_rest_route(), as of writing, doesn’t have such a documentation; however, you can call $request->get_attributes() inside of your endpoint callback to get the full (registration) options (including those not explicitly specified) for that … Read more

Validate and Sanitize WP REST API Request using WP JSON Schema?

You’re already providing a schema, the parameters in args are their own schemas, but WordPress does not enforce this schema or perform sanitisation/validation by default. You can make WordPress enforce it though by setting the validation and sanitisation callbacks to the following: ‘sanitize_callback’ => ‘rest_sanitize_request_arg’, ‘validate_callback’ => ‘rest_validate_request_arg’, rest_validate_request_arg will look up the parameter in … Read more

Hestia Child theme creation

Yeah, as you found out you don’t want to edit files directly in your theme because you will lose the changes when the theme updates. Here is some info on child themes, if you haven’t you should read it. For your particular theme, it appears the developer offers a pre-made child theme, you just need … Read more

Displaying the right content on a page url

Because the naming convention is matter. You can create a new template for your different page and name it “page.php” and on the header portion give it a name: <?php /** * Template name: Different page tempate */ get_header(); ?> <div class=”yourclass”> <!– Your different template code should go here –> </div> <?php get_footer(); Once … Read more