Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable/hide blocks? #4573

Closed
paaljoachim opened this issue Jan 18, 2018 · 21 comments
Closed

Disable/hide blocks? #4573

paaljoachim opened this issue Jan 18, 2018 · 21 comments

Comments

@paaljoachim
Copy link
Contributor

This came up when I was thinking about the title "block."
Often I want to hide the title from the front view. One way would be to add a disable/hide checkbox option inside the block setting. Hiding the title and perhaps hiding other blocks. Greying out the title to show that it is hidden/disabled.

@youknowriad
Copy link
Contributor

You can extend blocks and set a block's isPrivate property to false or you can use of the different mechanisms to hide the blocks. https://wordpress.org/gutenberg/handbook/extensibility/#removing-blocks

Closing, let me know if it doesn't answer your question.

@paaljoachim
Copy link
Contributor Author

I was actually thinking more toward the user. For instance how to easily hide the title block because the user does not want it visible on the frontend. Or hiding other blocks the user wants to hide...

For instance testing out versions of a layout by hiding specific blocks to create another layout. Showing it to the customer and then modifying things along the way by clicking a checkbox to make blocks visible/non visible.

Having it open through the Gutenberg interface.

@youknowriad
Copy link
Contributor

youknowriad commented Jan 20, 2018

I'm not certain this is something we want to allow the users to do. It will add unnecessary options/toggles to the interface IMO. But deferring to our designers for input @jasmussen @karmatosed

@paaljoachim
Copy link
Contributor Author

I see what you mean...
We can just let it rest for now until we can think of additional use cases.

@karmatosed
Copy link
Member

I agree with you @youknowriad.

@unCommonsTeam
Copy link

Hi guys,
reading the comments I think this is the right place to share a good plugin about Gutenberg.
I would like to present you a free plugin that allows you to manage the Gutenberg editor.
It's called Gutenberg Manager and allows you to enable / disable the editor in the various post types (pages and posts included). It has more features but I leave them to you.

We have read tons of posts of people complaining about the future implementation of Gutenberg within the core in WP 5.0 and this has led us to find a simple solution.

Gutenberg Manager solves this problem and allows for example to continue using Elementor, Visual Composer, Siteorigin Builder or Cornerstone without any problem even after WP 5.0.
From the first user feedback on WP.org the plugin seems to be apreciated :)

For this reason I would like to introduce you to Gutenberg Manager -> https://wordpress.org/plugins/manager-for-gutenberg/

The plugin can be used by developers in their own themes and plugins thanks to some useful hooks. There is an hook to HIDE the plugin option panel so the final user will not see it in WP backend (great feature for the devs that want to include Gutenberg Manager in their projects).

We are also making arrangements with the teams of most famous Builders to activate partnerships and collaborations. In this way we hope to make the transition to Gutenberg a little less traumatic!

Thank you all for your attention,
Good job.

@jasmussen
Copy link
Contributor

That seems like a great plugin! I hope it will be popular 👍

@unCommonsTeam
Copy link

Thank you @jasmussen, we hope too!

@paaljoachim
Copy link
Contributor Author

paaljoachim commented Mar 8, 2018

The plugin offers a lot of great features!

screen shot 2018-03-08 at 17 54 46

@unCommonsTeam
Copy link

unCommonsTeam commented Mar 9, 2018

Thank you @paaljoachim ! We will try to support and improve our Plugin after WP 5.. It will be hard to do because we are reading about many changes in the code respect the actual Gutenberg Plugin.. But we know we can do it!

We hope Gutenberg Manager can become a must!

Cheers

@jfagreg
Copy link

jfagreg commented Aug 12, 2018

Am I missing something? It seems to me that it is necessary to be able to hide the title. Most homepages built with a page builder do not show the title of the page. I think this is the normal use case for a home page that is not an archive page, and not the exception. For example, I'm trying to build my now Beaver Builder home page with Gutenberg, and I have to resort to custom CSS to hide the title. Not good.

@patecm
Copy link

patecm commented Aug 16, 2018

I agree with jfagreg. The majority of webpages don't have a massive title at the top of the page. Look at how many portfolio-style or simply imaged based themes there are. Would they really want to suddenly have a bulking, unsightly title at the top?
It makes sense for posts to have titles, but not pages.

@handycrowd
Copy link

Found this thread whilst searching to find out how to hide the title block...
E.g: I'm editing a simple "start here" page, and definitely don't want a great big, 'start here' at the top.

@lalablog
Copy link

lalablog commented Jan 6, 2019

Blocks is the WORST idea ever. I wish I had never "updated" my wordpress site. I am a teacher with a blog who teaches writing to university students. Blocks is not conducive to the writing process AT ALL. I'm guessing that the developer who came up with this idea has never taken a writing class or any course that requires writing and critical thinking.
So now I'm wasting the time that I could be spending on making content for my blog (time which is limited to the short nap that my kid takes) trying to figure out how to get rid of this hideous "improvement." If anyone can help me with that, I'd be grateful.

@apeatling
Copy link
Contributor

apeatling commented Jan 7, 2019

I think this is ultimately needed, especially for page building. I don't want “Home Page” or “Home” rendered on my home page.

@jasmussen
Copy link
Contributor

I understand the usecase, and I think that there are use cases for it. I think the key, though, is how we implement this, and in that vein I agree with Riad and Tammie that a specific "toggle" implemented across all blocks does not seem like the best solution.

Let's break it up, though — the example mentioned is the Title. I think this one deserves separate treatment and therefore separate ticket (and I could swear that there was already a ticket about this). The title should probably simply be a block on its own. That way you can simply delete it if you like — or you can put it elsewhere, for example someone might want to insert a Cover image, and then insert the Title block inside.

The challenge there, and why it's not part of phase 1, is that so far the title element has served double-duty as both in-page/post title and title metadata (i.e. browser tab title). If a user can delete the title block, how can they then change the metadata title? The answer to that can likely inform improvements to the permalink design also; perhaps it is simply customizable from the sidebar and pre-publish experience. If an existing ticket for the title block does not exist, feel free to open one!

For other blocks this is a separate challenge that would also be good to look at separately. There is a use case for showing and hiding blocks at various responsive breakpoints. There is a use case for including or not including blocks as part of the archive view (excerpt). If looked at holistically, I imagine there's an elegant solution to be found to both of those. Are there other use cases for hiding blocks that aren't the title?

Oh, and @lalablog you can install the Classic Editor plugin.

@mapk
Copy link
Contributor

mapk commented Jan 7, 2019

Let's break it up, though — the example mentioned is the Title. I think this one deserves separate treatment and therefore separate ticket (and I could swear that there was already a ticket about this).

I agree on breaking this one out. Looks like there's a ticket here: #11553

@paaljoachim
Copy link
Contributor Author

paaljoachim commented Jan 19, 2019

Thinking title block vs other blocks.

Title block: Can not be deleted must be a part of the layout. Always starts up on the top of the backend. It can be moved around different locations or on top of a cover image/nested.
I made an issue for an option inside the contextual block menu to hide a block (linked just above here). This means one goes to the contextual menu and just hides the block from being seen on the frontend. Hide block becomes just an option that can be used for any block including the title block.

Bottom line is that the title block would be very similar to any other block with just one difference it can not be deleted. It can be hidden like any other block. Moved around in the layout like any other block.

@unCommonsTeam
Copy link

The plugin offers a lot of great features!

screen shot 2018-03-08 at 17 54 46

Hello paaljoachim,

we are happy to share that we updated the plugin to work with WP5.x

Thank you for your feedback!

Best Regards

@ndiego
Copy link
Member

ndiego commented Jan 12, 2021

In case anyone come upon this ticket, I built Block Visibility solve this issue, which is available for free on the plugin repo. It easily allows you to hide any block in Gutenberg. Shameless plug I know, but it is extremely useful. In FSE mode, you can hide the page title as well and anything else that is a block.

@paaljoachim
Copy link
Contributor Author

Hey Nick @ndiego

I just saw the video you made showcasing the Block Visibility plugin. I just got to say wow! That can be a very useful plugin.
Thank you for sharing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests