Hi,
Does anyone know how to make Bricks the default editor? I would like to go directly to Bricks when I click on the page or post title.
Thanks a lot !
(I’m using WPCodeBox)
Hi,
Does anyone know how to make Bricks the default editor? I would like to go directly to Bricks when I click on the page or post title.
Thanks a lot !
(I’m using WPCodeBox)
You can do that via a bit of code. I guess you can also add this in WPCodeBox as well.
Basically you need to check if you’re editing a page (or any other page / post type etc) and redirect it to the frontend and append the ?bricks=run query param.
Something like this might do the trick: (adjust it to fit your needs) * NOT TESTED!
function redirect_to_bricks_builder( $url, $post_id ) {
if ( get_post_type( $post_id ) !== 'page' ) {
return $url;
}
$url = get_permalink( $post_id ) . '?bricks=run';
return $url;
}
add_filter( 'get_edit_post_link', 'redirect_to_bricks_builder', 10, 2 );
Thanks a lot Cristian ! It works very well and thanks also for the explanation
This is a great solution, but be aware that clicking the Bricks icon in the builder (top left) will send you straight back to the builder page again and again if you have Bricks settings set to ‘exit to edit page’.