michigan_wordpress_guy
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
It is a page building block provided by WooCommerce, so probably very common use case.
https://woocommerce.com/products/woocommerce-gutenberg-products-block/
@eric3d Yes my code snippet above allows an Editor user to edit settings and save a new banner, tested on the life site. No granting of permissions beyond assigning Editor to a user.
Your snippet would probably work in functions.php too but I think it would require the
remove_action()call first.I was able to get this working with the following code in my functions.php:
remove_action('admin_menu', 'simple_banner_menu'); add_action('admin_menu', 'new_simple_banner_menu'); function new_simple_banner_menu() { add_menu_page('Simple Banner Settings', 'Simple Banner', 'editor', 'simple-banner-settings', 'simple_banner_settings_page', 'dashicons-admin-generic'); }I’d really like this feature too – I’m surprised it isn’t more requested.
I tried the code snippet but I got a PHP error although I don’t see any obvious syntax problems. Any suggestions @eric3d ?
Viewing 4 replies - 1 through 4 (of 4 total)