Skip to content

Commit 6a6b4bd

Browse files
fix: gutenberg error
1 parent 598c0fa commit 6a6b4bd

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎wordpress/wp-content/themes/nuepress/functions.php‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,9 @@ function mytheme_admin_bar_render()
4747
$wp_admin_bar->remove_menu('comments');
4848
}
4949
add_action('wp_before_admin_bar_render', 'mytheme_admin_bar_render');
50+
51+
// https://github.com/WordPress/gutenberg/issues/1761#issuecomment-412876340
52+
add_filter('rest_url', function ($url) {
53+
$url = str_replace(home_url(), site_url(), $url);
54+
return $url;
55+
});

0 commit comments

Comments
 (0)