/** * Redirect only the main WordPress REST API index * example.com/wp-json/ * * Other REST API endpoints remain functional. */ add_action( 'parse_request', function ( $wp ) { if ( ! isset( $wp->query_vars['rest_route'] ) ) { return; } $rest_route = untrailingslashit( (string) $wp->query_vars['rest_route'] ); // Redirect only the REST API root/index. if ( '' === $rest_route || '/' === $rest_route ) { wp_safe_redirect( home_url( '/' ), 302 ); exit; } }, 1 );

Example Post for WordPress

This is a sample post created to test the basic formatting features of the WordPress CMS.

Subheading Level 2

You can use bold text, italic text, and combine both styles.

  1. Step one
  2. Step two
  3. Step three

This content is only for demonstration purposes. Feel free to edit or delete it.

// width=
? Hi, Greetings from HELP. How can I help you?