Skip to content

Page Blocks Builder 4 Build a Page. A Tool. An Experience.

Design with native WordPress blocks, write your own HTML, CSS and JavaScript, or let your AI agent draft sections through Site Agent. The canvas, the source editors and the live preview work together, and the source stays in WordPress.

Most of the high-end pages on gauravtiwari.org, including this one, are built with it.

Try it in your browser first: no signup, a private WordPress workspace. Or see what you can build.

  • Version 4.2.0
  • WordPress 6.0+
  • PHP 8.1+
  • Free, GPL-2.0
Visual canvas
Native WordPress blocks with Auto and Freeform layout.
Your own code
HTML, CSS and JavaScript editors beside a live preview.
Reusable library
Place sections by shortcode, hook or theme region.
Site Agent skill
Claude, ChatGPT or Cursor can build draft pages.

Try the Real Builder Before You Install Anything

The live demo opens the actual plugin in a fresh, private WordPress workspace with sample content ready to edit. No signup, no download.

  • No signup
  • Private workspace
  • 2 hours to explore
Open the Live Demo

Opens demo.gatilab.com in a new tab. The first launch can take a minute.

demo.gatilab.com/pbb/ Page Blocks BuilderLive demo workspace Choose where to start The Visual CanvasA page made from native blocks. Select the headline and make the first change.The Code EditorsA code page with a working calculator. Change the source and watch it respond.The Reusable LibraryA shared announcement block. Compare a linked placement with a copy. Launch the Visual Builder

Visual Freedom. Code Control. New in Version 4

Build on the page, refine the source and move between both as the work changes. Version 4.2 adds the newest piece: your own AI agent, working through the same safe save path.

Add a pricing section to the launch page.

  1. context
  2. page.sections
  3. page.set_sectionstaged

Version 4.2

AI Agents Through Site Agent

With Site Agent 0.4 or later, a connected agent such as Claude, ChatGPT or Cursor gets the Page Blocks skill automatically. It can draft pages, edit sections and manage the library.

Version 4.0

Edit on the Canvas

Native groups, headings, images and buttons, edited in place with type, color and spacing controls.

Version 4.0

Auto or Freeform

Keep blocks in flow, or drag and resize on desktop with snapping guides. Freeform stacks in reading order at 768px and below.

Drop to upload
hero.webp

Version 4.0

Drop In Media

Drag files from your desktop into the canvas. They upload to the Media Library as native Image, Video, Audio or File blocks.

VisualCode

Version 4.1

Visual and Code, Both Ways

Convert supported sections in either direction, with undo. Unsupported or ambiguous markup stays code.

⌘C⌘X⌘V

Version 4.1

Copy, Cut and Paste

Move an element or a whole section with the shortcuts you already use, or the editor clipboard.

Version 4.1

Blank Canvas

A page template with no theme header or footer, on classic and block themes. WordPress scripts and styles still load.

See What Your Code Can Become Three Working Examples

A page can do more than display content. Pick an example, use it, switch to a phone width, then open the same source in the playground and make it your own.

your-site.com/work/Live
Filter the projectsEdit This Example

These run in sandboxed frames with sample content. Accounts, payments and stored data need the right WordPress backend or external service.

Components You Can Build Live on This Page, No Frames

Every component below runs in this page, built from plain HTML, CSS, SVG and a few lines of JavaScript inside Page Blocks. Pricing, charts, configurators, bookings and forms are all sections you own and can reuse.

Pricing Switcher

HTML CSS JS

Starter

$15per month

  • 1 website
  • Email support
PopularStudio

$40per month

  • 10 websites
  • Priority support

Billed monthly. Sample prices.

SVG Data Chart

SVG CSS JS

Hover or focus a point. Sample data.

Before and After

SVG CSS

BeforeAfter

Product Configurator

SVG JS

GOOD IDEAS
Color
Size

Coral, 8 oz$14

Booking Picker

HTML JS

Pick a day and a time.

Command Palette

HTML JS

  • Insert SectionCtrl+I
  • Open LayersL
  • Toggle FreeformF
  • Preview at 390pxCtrl+B
  • Open AI AssistantCtrl+K
  • Save PageCtrl+S
  • Convert to CodeC
  • Duplicate SectionCtrl+D

Type to filter. Use the arrow keys and Enter.

Onboarding Tour

SVG CSS JS

Pick a Starting Section

Start from a native section or paste code you already have.

Step 1 of 3

Live Countdown

HTML JS

Until the new year

00Days
00Hours
00Minutes
00Seconds

Calculated in the visitor’s own timezone.

Multi-Step Form

HTML CSS JS

Demo form. Nothing is sent or stored.

Try the Code. See the Result.

Choose an example, edit the HTML or CSS and watch the preview change. Update the JavaScript and select Run Code to try its behavior.

Interactive Code Playground
Ready to edit
Live preview

HTML and CSS update as you type. Cmd/Ctrl+Enter runs JavaScript.Runs in your browser only. Nothing is saved to WordPress.

This Site Runs on It Built With Page Blocks Builder

Most of the high-end pages and posts on gauravtiwari.org are built with Page Blocks Builder, including the page you’re reading. It isn’t a demo plugin. It carries a real site’s homepage, service pages, product pages and long-form resources.

132
Pages
79
Posts
76
Product pages
114
Study notes

More than 430 published pages, posts, product pages and study notes on gauravtiwari.org use Page Blocks.

Visual Blocks and Code, Together

Start in the mode that suits the section. Selecting a visual block opens Visual mode; selecting a code section brings its editors into view.

Design on the Canvas

Use native WordPress groups, headings, paragraphs, images and buttons, edited directly in the visual canvas.

  • Edit text and adjust type, color and spacing.
  • Use Auto layout or Freeform desktop placement.
  • Find nested content in Layers, with responsive styles.
  • Drop media from your desktop into the Media Library.

Work With Your Own Code

Keep HTML, CSS and JavaScript in separate CodeMirror editors beside the preview. Existing code sections keep their workflow.

  • Bring your own code or a section from an AI tool.
  • Edit supported preview text without losing the source.
  • Check desktop, 992, 768, 480 and 360px widths.
  • Line numbers, bracket matching and folding.
Visual and Code
Convert supported sections with undo; ambiguous content stays code.
Copy, Cut and Paste
Reuse an element or move a whole section.
A Blank Page
The Blank canvas template drops the theme header and footer.
Auto or Freeform
Normal flow, or drag and resize with snapping guides.
Page Settings
Change title, slug and template from one dialog.
JSON Import and Export
Export sections as JSON, then add or replace on import.
Keep WordPress Blocks
Unsupported blocks stay in the document with Gutenberg editing.
Emmet and Snippets
Type section.hero>h1+p and press Tab in the HTML editor.

Keyboard Shortcuts

Cmd/Ctrl+S
Save the page
Cmd/Ctrl+K
Open the AI assistant
Cmd/Ctrl+B
Cycle preview widths
Alt+1
Focus the HTML editor
Alt+2
Focus the CSS editor
Alt+3
Focus the JavaScript editor
Ctrl+Space
Theme class suggestions
Tab
Expand an Emmet abbreviation

Shortcuts follow focus: typing and undo act on the editor you’re in, while section commands apply to the page.

Build With Your AI Agent Through Site Agent

Site Agent is a free plugin that connects AI clients such as Claude, ChatGPT and Cursor to your site over MCP, signed in with OAuth. With Site Agent 0.4 or later and Page Blocks Builder 4.2, a connected agent finds the Page Blocks skill on its own. No extra setup.

  • Create draft pages from sections, on the blank canvas if you want
  • List, read and edit the sections on an existing page
  • Create, update, duplicate and render library blocks
ClaudeSite Agent connected

Add a three-plan pricing section after the features on our launch page. Keep it as a draft.

  1. contextRead the site, plugin version and theme positions
  2. page.sectionsListed 6 sections on /launch/
  3. page.sectionRead section 3, Features
  4. page.set_sectionInserted Pricing after FeaturesStaged as autosave
Pricing section staged on LaunchYour live page is unchanged. Open the preview to review it.
Example conversation

Staged, Not Published

Changes to a published page are saved as your autosave unless you ask the agent to publish.

Stale Reads Refused

Every write carries the hash from the latest read. If the page changed in between, the save is refused.

No PHP From Agents

Agents can’t turn on PHP execution, and sections that already run PHP stay editable only in the block editor.

Serializer-Safe Markup

Section markup goes through WordPress’s block serializer, so quotes, — and script tags stay intact.

The 10 Skill Commands
context
Plugin version, post types, theme positions and permissions
page.sections
Sections in page order, with a content hash
page.section
One section’s full attributes
page.set_section
Change, insert or append a section, safely
page.create
A new draft page, optionally on the blank canvas
section.markup
Serialized block markup to embed elsewhere
blocks.list
Search library blocks with usage counts
blocks.create
A library block, starting as a draft
blocks.update
Patch an existing library block
blocks.render
Rendered HTML, CSS and JavaScript

Commands run as the WordPress user the agent is connected as, through gt_pb_agent(). Library commands also work over the pbb/v1 REST API with an application password.

Copy It or Keep It Linked

A section can belong to one page or stay connected to a shared library block. Choose the ownership that fits the job.

A copy is independent. Changing one page’s section leaves the other copies alone.

Use copies for one-off designs. Use linked sections when the same change should reach every placement.

Example Section
Page 1
Page 2
Page 3

Try the color change, then switch ownership.

Published Page Blocks library with search, sorting, live thumbnails, usage counts, and shortcode controls
The library: search, sorting, live thumbnails, usage counts and shortcodes.
Find the Right Block
Search by name, switch between published, drafts and trash, and sort by updates, title or usage.
Understand a Placement
Cards show the slug, content-type badges, usage count and a copyable shortcode.
Keep Useful Metadata
Titles, stable slugs, tags and descriptions. A slug reads better in code than a numeric ID.
Recover Earlier Code
Library changes keep revision history with restore. Keep full site backups too.

Library shortcodes render published blocks only. Keep a shared block in draft while you prepare it, because a linked update can change several live pages at once.

One Section, Four Places

A reusable section can serve a page, a shortcode, a WordPress hook or a theme region. Pick a route to see what it needs.

Keep a Section With One Page

Use an inline Page Block when the section belongs to one page. Keep blockId at 0 and blockSlug empty so a library reference can’t override its source.

block markup
<!-- wp:gt-page-block/page-block {"blockId":0,"blockSlug":"","name":"Contact Section","content":"<section>...</section>","css":"","js":"","phpExec":false} /-->

Target the Right Context

Narrow placement by post type, page type and post ID. Page types include the front page, singular content, archives, search and 404.

Know What Honors Conditions

Positioned blocks and theme regions enforce conditions. Gutenberg links use respectConditions; shortcodes opt in with conditions="true".

Use Rules Deliberately

Values in one group are alternatives; separate groups must all match. An empty rule set is broad, so review it before a site-wide placement.

Keep Control of What Loads

A published page loads only the styles and scripts its sections need. Choose the delivery for each section and inspect the cost before you save.

  • Keep small CSS inline, give a section its own stylesheet, or defer CSS for content further down
  • Load JavaScript inline or in the footer, kept with its section
  • File generation falls back to inline CSS if storage fails

These are diagnostics, not a PageSpeed score. Some markup checks need WordPress 6.2 or later.

Built-In AI and a Real API

Use the in-editor assistant with your own provider key, or script the library through REST and WP-CLI. Both respect WordPress permissions.

The In-Editor Assistant

Connect OpenAI, Anthropic or Gemini to draft or edit section code with Cmd/Ctrl+K. Bring your own API key; provider usage is billed separately. Review generated HTML, CSS and JavaScript before you save, since requests can include section content and theme context.

  • OpenAI
  • Anthropic
  • Gemini
MethodRoutePurpose
GET/wp-json/pbb/v1/blocksList and search library blocks, with status and pagination filters.
GET/wp-json/pbb/v1/blocks/{id}Read one library block and its saved fields.
POST/wp-json/pbb/v1/blocksCreate a block. Use draft status and an empty position while you prepare it.
PUT / PATCH/wp-json/pbb/v1/blocks/{id}Update supported fields on an existing block.
POST/wp-json/pbb/v1/blocks/{id}/duplicateCreate an independent duplicate.
DELETE/wp-json/pbb/v1/blocks/{id}Move a block to trash; permanent deletion is separate.
GET/wp-json/pbb/v1/blocks/{id}/renderRendered output, subject to the plugin’s rendering rules.

WP-CLI for Repeatable Tasks

Inspect the library or preview a legacy migration. Sample slugs must match real library items on your site.

terminal
wp gt-pb block list --status=publish --format=json
wp gt-pb block get footer-cta
wp gt-pb migrate-blocks --dry-run

Permissions and Safe Writes

  • REST reads need edit_posts; writes need manage_options.
  • Authenticate with an application password or the session’s REST nonce.
  • Back up the current fields before a shared-block update, then verify the stored result.
  • REST fields use php_exec and js_location; Gutenberg attributes use phpExec and jsLocation.
Gutenberg block
gt-page-block/page-block
Library shortcode
[page_block slug="footer-cta"]
Theme helper
gt_pb_region()
Agent helper
gt_pb_agent()

Get Page Blocks Builder

Free GPL-2.0-or-later

The visual canvas, code editors, reusable library, optional AI and the Site Agent skill are all included.

Checkout gives you a free update key for automatic updates. AI-provider charges are separate.

From an Idea to WordPress

  1. Get the ZIP

    Complete the free checkout and download the plugin.

  2. Choose the Post Types

    Activate the plugin and allow the post types you want to edit.

  3. Build and Save

    Insert a Page Block in Gutenberg or open the visual builder, then check the published result.

  4. Connect an Agent (Optional)

    Install Site Agent 0.4+ and your AI client gets the Page Blocks skill.

Requires WordPress 6.0+ and PHP 8.1+. Source and releases on GitHub

I Build Tools That Pay for Themselves And Give Away the Ones That Can’t

Everything here is quick to set up, light on your pages and built to do one real job well. I only charge for the tools that can make you money. The rest are free.

Gaurav Tiwari

Hi, I’m Gaurav

I design, build and support every product on this site myself. When you email me, the person reading it is the one who wrote the code.

I’d rather ship one tool you’d miss if it vanished than ten that sit in your plugin list doing nothing.

  • You talk to me, not a ticket queue
  • Paid tools have to earn their price
  • Free tools stay free
More about me

18+years building websites, plugins and stores, since 2008

I obsess over performance

Switch a feature off and it loads nothing. What does load stays small. A tool that replaces a plugin shouldn’t make your pages slower.

I care how it feels

Clear screens, sensible defaults and settings written in plain English. If you need a tutorial for the basics, that’s my design mistake, not yours.

I build for everyone

Full keyboard support, visible focus, proper labels and text you can actually read. When more people can use your store, more people can buy from it.

I build tools that earn

My paid tools help you sell, renew, license or convert. If one just sits in your stack, I haven’t done my job.

If it can’t earn, it’s free

I won’t charge for anything that can’t make you money. The free tools get the same care as the paid ones, down to the last setting.

Before You Build

Editing choices, agents, compatibility and the practical limits.

Saved source stays in WordPress, but Page Blocks and library shortcodes need the plugin to render. Ask a product question.

Is Every Builder Feature Free?

Yes. The visual canvas, code editors, library, Site Agent skill and the other builder tools work without a license key. The free checkout gives you an update key for automatic updates. Optional AI uses your own provider API key, billed by the provider.

Do I Need to Write Code?

No. You can build supported visual sections with native WordPress blocks. Use HTML, CSS and JavaScript when you want custom layouts, calculators or other interactions, or bring code from another tool or your AI agent.

Can My AI Agent Edit My Pages?

Yes, with Site Agent 0.4 or later connected. The agent can draft pages and edit sections, but changes to a published page are staged as your autosave unless you ask it to publish. It can’t turn on PHP execution, and a save is refused if the page changed since its last read.

Can I Mix Visual Blocks and Code?

Yes. Both sit on the same page, and selecting a section switches to its editing mode. Conversion is an explicit choice for supported content. Unsupported or ambiguous markup stays code, and converted native block code needs 4.1.0 or later.

Can I Keep My Current Theme?

Yes. The plugin works with classic and block themes. Keep the theme’s page shell or choose the Blank canvas template for a page without a header or footer. Named theme regions need matching gt_pb_region() calls in the theme.

Will My Older Sections Keep Working?

Yes. Existing code sections, linked library references and legacy Page Block names remain supported, and version 4 doesn’t convert them automatically. Keep the code workflow and add visual sections when you need them.

Can I Build a Complete Application With It?

You can build the interface and its browser interactions in HTML, CSS and JavaScript, like the components above. Accounts, payments, database storage and server processing need the right backend or integration. Optional PHP needs explicit site-level and per-block permission.

Your Next Page. Your Way.

Start with a visual block, a piece of code or a prompt to your AI agent.