Linux 软件免费装
Banner图

Konrad's Editable HTML

开发者 konradS
更新时间 2026年10月1日 09:31
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPL-2.0-or-later
版权网址: 版权信息

标签

blocks templates custom html editable patterns

下载

0.2.0 0.3.0 0.1.0 0.4.0

详情介绍:

Your custom HTML and page template parts, client-editable in one click. Your templates are full of sections clients can't touch. The hero, the intro block, the call to action - all sitting in PHP, so every small text change means a message to you. Move them out, one at a time. Your layout stays exactly as you built it. Clients change only the parts you chose. Built on core blocks. Deactivate the plugin - your content stays. On 7.1+, it even stays editable. Two ways to use it 1. A section on a page
  1. Add a Custom HTML block and paste your section, <style> included.
  2. Click Make editable in the block toolbar.
  3. Tick the parts clients may change.
  4. Click Lock HTML before you hand the site over.
Clients click the text and type. Nothing else moves. 2. A section stuck in a PHP template For classic and hybrid themes, where templates are PHP files.
  1. Go to Appearance → Patterns and add a new one. Can't see Patterns in your backend? Scroll down for tips.
  2. Add a Custom HTML block and paste the markup from your template.
  3. Click Make editable, tick the parts, lock the HTML.
  4. Save. Then open Use in a template in the sidebar and click Copy code.
  5. Paste that code into your template, in place of the old markup.
The section looks exactly the same, and clients edit it under Patterns instead of messaging you. The code you get is core WordPress - get_page_by_path() and do_blocks(), nothing of this plugin. It finds the pattern by slug, not by ID, so it survives a move from staging to live. Deactivate the plugin and the template keeps working. Can't find the Patterns screen? The plugin's How to use page links straight there. Find it next to Activate and Deactivate on your Plugins screen. What you get Who it's for Native first On WordPress 7.1 and newer, the Custom HTML block can hold editable core blocks inside static HTML. Konrad's Editable HTML finds the parts that can be edited and sets them up for you. The result is plain WordPress: headings and paragraphs are core blocks, no plugin needed to keep editing them. Every conversion is checked by WordPress's own parser first. If anything would not work, nothing is changed. On older WordPress (6.6 to 7.0), "Make editable" uses the plugin's lightweight Editable HTML block instead. Make all editable Links, images and lists can't be kept exactly by core's editable slots, so they stay fixed at first. Click Make all editable (in the message, or in the toolbar afterwards) and the Editable HTML block takes over: You stay in control No lock-in Both modes save finished HTML into the page. Deactivate or delete the plugin and your pages look exactly the same. Try it in 5 minutes Open the live demo in your browser, no install: Try it live Free and open source Code, issues and ideas on GitHub. If it saves you time, a GitHub star or a review here helps others find it. Built by Konrad Sroka and Claude AI. Thanks, WordPress community.

安装:

  1. Plugins → Add New → search for "Konrad's Editable HTML", or upload the zip.
  2. Activate.
  3. Select a Custom HTML block and click Make editable.

常见问题:

Do I need Node, npm or React?

No. The plugin is plain PHP and JavaScript. There is nothing to build.

Do I need a block theme?

No. It works with classic and block themes, anywhere the block editor works.

Does my JavaScript run in the editor?

No. Scripts in your HTML only run on the front end, like in the Custom HTML block.

Can Authors and Contributors edit these blocks?

They can change the editable parts. In the Editable HTML block, WordPress removes custom HTML such as <style> when people without the "unfiltered_html" capability save a page. The block warns them. Core's editable slots (WordPress 7.1+) don't have this problem for the text itself.

What happens to my CSS?

It stays in your HTML, exactly as written. Selectors without a class (for example h1 { }) affect the whole page, so prefer class names.

What happens if I deactivate the plugin?

Your pages look exactly the same. On WordPress 7.1+, headings and paragraphs made editable with core slots stay editable. Editable HTML blocks keep their HTML; WordPress offers to keep them as Custom HTML.

Can I use this in a theme template, not just on a page?

Yes. Build the section as a pattern, then copy the template code from the Use in a template panel and paste it into your template file. The code uses core functions only.

Does the pattern have to be synced?

No. A template always shows the pattern as you edit it under Patterns, synced or not. The difference only shows up inside posts: a copy of an unsynced pattern placed in a post is separate, so edits made there never reach the template. The panel says so when a pattern is unsynced.

The pattern looks plain in the editor

Your theme's CSS is not loaded there. Classic themes need add_editor_style( 'style.css' ); in functions.php. Block themes load their styles already.

更新日志:

0.4.0 0.3.0 0.2.0 0.1.0