Forum Replies Created
Viewing 4 posts - 1 through 4 (of 4 total)
-
AuthorPosts
-
28/10/2021 at 16:24 in reply to: Multi-Author permission for company profile in a business directory #7743
WolfE1963
ParticipantHi Vladimir,
thank you very much. I#ll go your steps.
Wolfgang
WolfE1963
ParticipantDear Vladimir,
so sorry, I overlooked your reply.
IT WORKS!!! What a game changer.
Thank you so much for what you are doing and for your support.
Yours,
WolfgangWolfE1963
ParticipantHi Vladimir, hi David,
I found a code that allow/disallow blocks for specific post types. Is it possible to change that code in a way that I can allow all blocks for admins and only specific blocks for the user roles?
I’m not a coder ;-), maybe something like If(!current_user_can(‘author’) array a,b,c …That’s the code from https://rudrastyh.com/gutenberg/remove-default-blocks.html#remove_blocks
add_filter( 'allowed_block_types', 'misha_allowed_block_types', 10, 2 ); function misha_allowed_block_types( $allowed_blocks, $post ) { $allowed_blocks = array( 'core/image', 'core/paragraph', 'core/heading', 'core/list' ); if( $post->post_type === 'page' ) { $allowed_blocks[] = 'core/shortcode'; } return $allowed_blocks; }Please stay safe
WolfgangWolfE1963
ParticipantHello Vladimir,
did you realize it?
Thanks -
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)