0

For example:

    $args = array(
    'type'              => 'string',
    'description'       => '',
    'sanitize_callback' => null,
    'show_in_rest'      => true
);

//Job Board Settings Info
register_setting( 'jobboard-settings', 'company_name', $args );

I have trouble figuring out which route these are exposed to.

2 Answers 2

1

Settings are accessible through the Settings endpoint:

/wp-json/wp/v2/settings
6
0

You have to register_setting() in both admin_init & rest_api_init hooks in order to get your setting through wp/v2/settings REST API endpoint.

Had the same issue and found the solution in this blog post to save me

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.