EDITS.WS

Tag: wordpress blocks

  • How to Hide Blocks from Specific Users in WordPress Editor

    Are you looking for a way to hide certain WordPress blocks from a user role?

    The WordPress content editor offers a lot of flexibility in creating content using blocks. However, you may want to disable some blocks for different user roles. This is helpful if you run a multi-author website or don’t want others to access specific blocks.

    In this article, we’ll show you how to hide blocks from specific users in the WordPress content editor.

    How to Hide blocks from specific users in WordPress editor

    Why Hide Blocks from Specific Users in the Content Editor?

    WordPress blocks are content elements you add to your blog post or page. You can add blocks for images, videos, paragraphs, galleries, and more. Many WordPress plugins also add blocks to the content editor.

    Since each block lets you edit your article or landing page, it is a good idea to hide or disable some of the blocks based on WordPress user roles. This way, your website content will remain consistent and won’t have unwanted blocks and layouts.

    Let’s say you have a multi-author website. You can hide the tables block in the WordPress content editor for author and contributor user roles. This helps streamline your editorial workflow.

    Similarly, you can also prevent different user roles from using blocks added by different plugins.

    For instance, WPForms lets you embed forms in the content editor using the WPForms block. Stopping other users from accessing the block can help you stay in control and only display forms where you think is necessary.

    That said, let’s see how to hide or disable blocks for specific users in WordPress.

    Hiding Blocks for Specific Users in WordPress Editor

    The best way to hide blocks based on user roles is by using the PublishPress Blocks plugin. It gives you more control over the WordPress block editor and adds more blocks like an image slider, search bar, pricing table, and more.

    First, you’ll need to install and activate the PublishPress Blocks plugin. If you need help, then please see our guide on how to install a WordPress plugin.

    Upon activation, you can head to the Blocks item in your WordPress dashboard and click on the ‘License’ tab.

    Add PublishPress blocks license key

    Next, you can enter your license key and click the ‘Activate License’ button. You can find the license key in your PublishPress account area.

    After that, head to the ‘Block Access’ tab in the plugin. Here, you can choose a user profile from the dropdown menu at the top.

    Choose user profile to hide blocks

    To hide any WordPress block from the selected user role, simply click the toggle to disable it.

    For example, in the image below, we’ll disable the ‘table’ and ‘quote’ blocks for any user iwth the Author role.

    Click the toggle to disable blocks

    Don’t forget to click the ‘Save Block Access’ button when you’re done.

    That’s it! You’ve successfully disabled the WordPress block for a user role on your website. Now, you can repeat this to hide blocks for other user roles.

    We hope this article helped you learn how to hide blocks from specific users in WordPress editor. You may also want to see our guide on how to increase your blog traffic, and our comparison of the best-managed WordPress hosting.

    If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

    The post How to Hide Blocks from Specific Users in WordPress Editor first appeared on WPBeginner.

  • How to Use the WordPress Imgur Embed Block

    If you’re a fan of the online image-sharing community, Imgur, you’re in luck! WordPress has an Imgur Embed Block that makes it easy to embed Imgur content in your posts and pages. This article will show you how to use the WordPress Imgur Embed Block.

    What is the Imgur Embed block?

    Imgur is a popular image-sharing site with a loyal community of users. It allows users to upload, share, and comment on images. The site has a user-friendly interface and is one of the most popular image-sharing websites on the internet.

    Homepage of Imgur - Sept 1st 2022

    Homepage of Imgur / Sept. 1st 2022

    If you’re a meme-loving human who uses Imgur you probably want to cross-pollinate your WordPress website with your Imgur posts. That is where WordPress’ Imgur Embed Block comes in.

    The WordPress Block Editor comes standard with a helpful directory of blocks that allow you to quickly build a page or post. There are other blocks that allow you to embed videos and embed Tumblr posts.

    In this article, we’ll cover the Imgur Embed block. This block allows you to pull images from your Imgur account onto a WordPress page. Here’s how it works!

    How to Add the Imgur Embed Block to your Post or Page

    If you’ve ever wanted to add an Imgur image post to your WordPress site but weren’t sure how this guide is for you. Adding an Imgur image using the embed block in the WordPress block editor is easy.

    First, inside your Imgur account, find the image you want to add and copy its URL.

    Embed Imgur WordPress - How to - Step 1

    Then, in WordPress, click on the “Add Block” button, find Imgur Embed, and select it.

    Embed Imgur WordPress - How to - Steps 2-3

    It will ask for a URL where you can paste the Imgur URL into the box that appears and hit enter.

    Embed Imgur WordPress - How to - Steps 4-5

    The image will automatically be added to your post. Preview the Imgur image post to see how it looks with your theme and other content.

    Embed Imgur WordPress - How to - Result

    That’s all there is to it! Next, we’ll explore the few settings and options of the Imgur embed block in WordPress.

    Imgur Embed Block Settings and Options

    The block toolbar for the Imgur Embed block has four options for alignment on a page. Each of these shifts the Imgur embed on the page in accordance with the chosen alignment. If None is chosen, then default settings take effect.

    • None – No alignment that is determined at the Block level
    • Align left – Make the block left-aligned.
    • Align center – Make the block alignment centered.
    • Align right – Make the block right-aligned.

    Embed Imgur WordPress - Settings - Align

    By clicking on the Tool Bar’s ellipsis icon, you’ll see universal Block commands and options. These are available for most every type of default block and not just for Imgur embeds.

    There are run-of-the-mill shortcuts like Copy and Duplicate on the block level. Additional options are the block editor specific commands to Insert Before, Insert After, Move To, and Edit as HTML.

    Lastly, there are the options to Lock the block in place, Add the Block to Reusable Blocks, and Group which groups multiple blocks together as a sort of unit.

    Embed Imgur WordPress - Settings - Block

    You can change the content’s behavior for viewing on a phone through the Imgur Block Settings on Media Settings. The Toggle switch turns responsive resizing on or off for smaller devices. The default setting is set to on, but if you notice it behaves poorly for you, you can turn the setting off.

    There is also the option to add a CSS Class to the block specifically. If you are editing this block’s styles via CSS, you’d assign the class in the Advanced settings section.

    Embed Imgur WordPress - Settings

    For more styling options, the Imgur Embed block can be converted to a Group.

    Embed Imgur WordPress - Transform Group

    This allows for spacing, typography, and background color settings to be applied to the whole block.

    Additionally, in the Group’s Advanced Settings, there is also the option to add an HTML Anchor ID for creating anchor links.

    Imgur Terms and Conditions

    It is worth mentioning that there are limitations on how you use Imgur on a website. Here is a word from Imgur:

    Please note that Imgur’s Terms of Service prohibit using Imgur as a content delivery network, hotlinking adult or illegal images, torrents, image hosting for commercial purposes, or sites that copy Imgur’s own functionality.

    But for most use cases, using the Imgur embed block is completely safe and a great way to share your images.

    Conclusion

    In conclusion, the WordPress Imgur Embed Block is a great tool to use when you want to embed an Imgur image in your WordPress post or page. All you need is the URL of the Imgur image and the Imgur Embed Block will do the rest. Give it a shot!

    For more, check out all of our WordPress block editor tutorials.

    Do you have any questions about how to use this WordPress block? Let’s talk about them in the comments section below!

    Featured Image via imgur / imgur.com

    The post How to Use the WordPress Imgur Embed Block appeared first on Elegant Themes Blog.