Daniel Richards
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Default end-of-post text in Gutenberg (how?)You could try creating that template content in Gutenberg using blocks, then switch from the visual editor to the code editor (from the ‘three dots’ menu in the top right corner of the editor), and finally use that markup in your function. It should result in blocks being created in your new post (the comments in the markup delineate the blocks).
There’s also another feature in Gutenberg called Reusable Blocks which might be interesting to you. If you, again, create your template in Gutenberg using blocks, select the blocks, then from the block settings menu (‘three dots’ at the top of the first select block), choose ‘Add to reusable blocks’. Give it an easy to remember name (e.g. ‘New Post Template’). Now when you start a new post you can insert the reusable block (fastest way is using the slash inserter by typing ‘/New Post Template’ in a new paragraph and hitting enter). If you want to edit it, you can use ‘Convert to Blocks’ to make it editable. Reusable blocks are really like creating a stamp from content.
Granted, reusable blocks are not as automatic as your existing way, but it might also be useful for other content you want to reuse across posts.
- This reply was modified 7 years, 8 months ago by Daniel Richards.
- This reply was modified 7 years, 8 months ago by Daniel Richards.
Hi @sharewebdesign,
For this, you could use the code in Gutenberg as a guide:
https://github.com/WordPress/gutenberg/blob/master/packages/editor/src/components/post-featured-image/index.js#L92-L102It’s implemented in Gutenberg by wrapping the
Buttoncomponent in aMediaUploadcomponent.MediaUploadprovides the Button component (defined in the render prop) with anopenfunction that when called triggers the opening of the modal.MediaUploadalso has anonSelectprop, which accepts a callback triggered when the media is selected in the modal.Forum: Plugins
In reply to: [Gutenberg] Gutenberg – o Sinal de ” + ” (adicionar blocos) não Funciona.Hi,
I’ve seen similar issues mentioned in other forum threads:
https://wordpress.org/support/topic/visual-and-block-editor-are-gone/The most common solution seems to be to make sure the ‘Disable the visual editor when writing’ option is not checked on the Edit Profile page.
Forum: Plugins
In reply to: [Gutenberg] Gutenberg layout not working on custom themeThat looks about right. I’ve compared it to twentynineteen:
https://github.com/WordPress/twentynineteen/blob/master/functions.phpI’d recommend calling the setup function something other than gutenberg_setup, it might not be the cause of your issues, but the name of the function should be unique in the WordPress codebase and this one has a high chance of clashing.
Another thing I’d like to double-check, are the quotation marks in your code correct? In your post they look like
‘, but they should be'. That might just be how the forum formats things, though.Finally, have you checked for PHP errors? That would be a good place to start if you still can’t see any of the block styles in your posts:
https://codex.wordpress.org/Debugging_in_WordPressForum: Plugins
In reply to: [Gutenberg] problem in galleryAh yes, I see what you mean now. You’re right. I was adding captions in the media library dialog, which is why I couldn’t reproduce the issue before.
There’s an open bug report for Gutenberg that tracks the issue:
https://github.com/WordPress/gutenberg/issues/8310It looks like it’s recently been prioritised, so hopefully a fix will be worked on soon.
Forum: Plugins
In reply to: [Gutenberg] Gutenberg layout not working on custom themeHi @nelisvl,
There are a few steps you might have to take to get your theme working correctly with the editor. Have you had a look through the Gutenberg handbook’s theme section? I’d recommend a read through it if you haven’t:
https://wordpress.org/gutenberg/handbook/designers-developers/developers/themes/theme-support/It sounds from your description like you might need to enable the default block styles for your theme:
https://wordpress.org/gutenberg/handbook/designers-developers/developers/themes/theme-support/#default-block-styles- This reply was modified 7 years, 8 months ago by Daniel Richards.
Forum: Plugins
In reply to: [Gutenberg] problem in galleryHi @moinsen,
I had a go at following your steps, but with my installation I didn’t encounter any problems with the titles or captions.
Do you have any other plugins installed that could be causing an issue?
Forum: Requests and Feedback
In reply to: The EditorHi @evelyn-jean,
I’ll try to help if I can:
First off, it harms my eyes; with the content that I write and write about, it is not doable.
Sorry to hear that. Is there anything specifically about it that makes it hard to use? Any feedback is useful. The best help I can offer here is that there are a few options in the menu in the top-right corner of the screen that help change the appearance (the icon looks like three vertical dots). There’s ‘Unified Toolbar’ which moves the block toolbar to the top of the screen, and there’s also a full-screen mode.
Second, it’s crammed in the center of the block, proving it to be even more difficult to write, upload photos, and edit. When I upload a photo, I have to cut and paste it in the proper place, as it posts it at the top.
Hmm, this sounds like a bug that was identified with the classic block in gutenberg (it should be solved in the next update):
https://github.com/WordPress/gutenberg/issues/10509By default, when editing a post that was created in the classic editor, that content is displayed within a classic block. It’s a way to keep Gutenberg backwards compatible. I’d recommend testing the editor out with a new post first to get an understanding of it, hopefully you’ll see the user interface is a bit different.
Forum: Requests and Feedback
In reply to: Please, Explain why Gutenberg ?Hi @boldt,
I’ll try to help with the two issues you’re having:
1) How do I get text-mode and media-upload at the same time?
The default block type is paragraph (text), and both dragging-dropping media into the editor or using the media library work ok. Would you be able to elaborate more about what you mean by text-mode and media-upload?
2) How do I get the media upload to accept a PDF-document?
This works ok on my installation, dragging and dropping a pdf creates a file block. What error are you seeing?
Thanks.
Forum: Fixing WordPress
In reply to: Custom CSS to add background to a block?Hi @wilx
On the topic of picking a custom color, there should be a custom color picker in the set of colors, it should be the last item in the color palette. There’s a chance the theme you’re using might result in it being disabled.
For adding custom css, I’d recommend using an Additional CSS Class on the block you want to style. Here are some steps:
1. Select the block you want to style, some blocks (like Columns) are a bit hard to select from the visual editor, but you can use the block navigation menu from the top toolbar (the icon looks like three indented horizontal lines).
2. Once you have the block you want selected, in the block settings sidebar under the advanced panel There’s an ‘Additional CSS Class’ input field, here you can add an extra classname to the block, e.g. ‘custom-background’.
3. In the customizer, add your styles targeting the additional class.Alternatively, you could look at installing a plugin with some third-party blocks. For example this plugin ‘Stackable’ has a container block that lets you set a background color or image and allows you to put a columns block inside it:
https://wordpress.org/plugins/stackable-ultimate-gutenberg-blocks/#descriptionForum: Fixing WordPress
In reply to: image upload failureHi @bvo, I’ve not had any issues with twentynineteen and uploading images in the gallery block. It could be other plugins causing an issue. Are there any other plugins that you have active?
Forum: Fixing WordPress
In reply to: Confused between Classic and GutenbergHi @nswriter123 – there’s a chance you might be experiencing similar to these users if you have the TinyMCE Advanced plugin active:
https://wordpress.org/support/topic/default-paragraph-blocks-not-working/Forum: Requests and Feedback
In reply to: Need Warning Message – Convert to Blocks Removes ContentHi @reneedobbs. Sorry to hear about that, not a great first experience with the editor.
I had a look on Github where the new editor is being developed and found a suggestion along the same lines as yours:
– https://github.com/WordPress/gutenberg/issues/12162Hope you don’t mind, but I’ve added a link back to your post here so that those contributing to the editor can see your suggestion. You should be able to follow that issue on github to see how it progresses, and feel free to post feedback directly on there as well.
Forum: Fixing WordPress
In reply to: Cannot edit existing pages after updateHi @fullforlife. What’s happening when you try to edit an existing page? Are you seeing an error or is the option not present at all?
If you’re able to describe any steps you’ve tried or share screenshots it would really help try to understand the problem. Thanks.
Forum: Fixing WordPress
In reply to: HELP YOU HAVE RUINED WORDPRESSHi @rayhanania – It would be great to diagnose the issue you have, as there may be a solution. If you’re able to share a screenshot, that’d be really helpful.