Using React inside the block editor is pretty straight forward since all requirements are already met. But what if you want to use React on a custom page? In my case, I wanted to use React on a custom settings page. Since I couldn’t find any information of how to achieve that, I looked into it deeper.
Continue reading Use React on a custom WordPress settings pageBlog
WordPress comes with a handy auto-download feature for non-installed locale files. But how to implement that in a custom function? Since I needed exactly this (I added an identical select for the locale on another settings page to improve our workflow), I looked for a way to get the exact same behavior.
Continue reading Trigger locale download in WordPress programmaticallyDid you know that there is a preview of all block editor UI components available? No? Me neither! Just a link in an issue pointed me to these awesome docs, thus I’d like to share it!
Continue reading Preview of all block editor UI componentsBy default, WordPress limits the users that are allowed to edit the privacy policy page, which has been defined in Settings > Privacy > Privacy Policy page. Only users that are allowed to change options (capability name: manage_options
) are allowed to do that.
Starting with version 2.0, Imagify implemented a “smart” compression mode that replaced the previous modes “normal”, “aggressive” and “ultra”. Unfortunately, it doesn’t seem to be that smart at all.
This new compression mode uses AI to determine the best compression mode for the given image. There’s no more option for you to tell Imagify which compression mode to use. The only alternative is the also new compression mode “lossless”, which produces much larger files than any of the other compression modes and had to be selected for every media manually.
Continue reading Disable “smart” compression mode in ImagifyIf you want to add a new sidebar control to an existing block, there are filters for that. Or if it’s your own block, you can just use InspectorControls
for that. But if you wand to add global settings, which reflect something for the whole post, you need to do it differently.
Since I couldn’t find a proper solution already described in a blog post or documentation, here’s my own one.
Continue reading Block editor: Add settings to document sidebarCurrently, the only way to add links to content in the block editor is using text links, buttons or links on images. But what if you need more? In my case, the request was to be able to link whole columns, cover blocks and group blocks.
Continue reading Add support for linkable column/cover/group blocksPost types usually already have a nice list view (if set to public) in the backend to list its posts. Unfortunately, to customize it you would need some effort in using multiple filters to change the columns, the column heads, the sorting and adjust the query to your liking.
Today, I show another approach by just adding a custom page with a similar but custom pagination.
Continue reading Add WordPress pagination on custom options pagesIf you limit the width of a search field, and use a long placeholder text, this text will be cropped before the end of the input field. Why? Because Safari reserves some space for an icon that will be displayed to clear the input field if you’ve entered a value.
Continue reading Search input in Safari: Cropped placeholderYou may know the content position setting in cover blocks to positioning the content inside the cover, which is horizontally and vertically centered by default. Since the group block can be used similar, and we used it inside a custom slider block, we wanted to have the identical settings for group blocks as well.
Continue reading Block editor: Content position for group block