The enqueue_block_assets is changing the styles of the editor interface

The trouble is that they ‘enqueue_block_assets’ is not the right hook to use for conditional resources anyway. The correct hook to use for the backend is : add_editor_style( ‘path/to/my-core-style-overrides.css’), which should be inside ‘after_setup_theme’ hook. This will ensure that these styles are incorporated in the admin editor iframe only and in all places where that … Read more

How to Dynamically Switch WordPress Front Page Without Causing Canonical Redirect?

I found a solution that worked (though I need to test it thoroughly) First, add a filter on the “page on front” option: function filter_page_on_front($default) { $current_post_language = detect_post_language(); if ($current_post_language) { $intro_page = get_current_page(); if ($intro_page) { $page_on_front = get_option(‘page_on_front_’ . $current_post_language, ”); if ($page_on_front && $intro_page->ID == $page_on_front) { return $page_on_front; } } … Read more