• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Genesis Custom Blocks

Genesis Custom Blocks

Create effective content faster.

  • Need Help?
You are here: Home / Block Lab PHP API Compatibility

Block Lab PHP API Compatibility

Genesis Custom Blocks is designed to be a replacement for the Block Lab plugin. Using Block Lab’s built in migration workflows, the vast majority of users will be able to transition to Genesis Custom Blocks without needing to make any manual changes.

However, if you’re creating custom blocks using Block Lab’s PHP API, specifically the block_lab_add_block or block_lab_add_field functions, you will need to update your code with new Genesis Custom Blocks function names.

The following changes are required:

  • Rename them block_lab_add_block() to add_block()
  • Rename them block_lab_add_field() to add_field()
  • Add a use statement to the top of your PHP file for each function

For example:

block_lab_add_block( $block_name, $block_config );

Will become:

use function Genesis\CustomBlocks\add_block;
add_block( $block_name, $block_config );

More information about namespacing and use statements is available in the PHP documentation.

Primary Sidebar

Get Started

  • Install Genesis Custom Blocks (free)
  • Install Genesis Custom Blocks Pro
  • Update Genesis Custom Blocks Pro
  • General Settings and Options

Create Custom Blocks

  • Create Your First Custom Block
  • Example Custom Block
  • Add a Custom Block to Your Website Content
  • Style Your Custom Blocks

Export and Import Custom Blocks

  • Export Custom Blocks to Include in Your Theme

Code References

  • Fields
  • Functions
  • Filters

Tutorials & FAQs

  • Tutorials
  • FAQs

Resources

  • Changelog
  • Block Lab Hook Compatibility
  • Block Lab PHP API Compatibility
  • Support

© 2013–2025 WPEngine, Inc. All rights reserved. WP ENGINE®, VELOCITIZE®, TORQUE®, EVERCACHE®, and the cog logo service marks are owned by WPEngine,Inc.
1WP Engine is a proud member and supporter of the community of WordPress® users. The WordPress® trademarks are the intellectual property of the WordPress Foundation, and the Woo® and WooCommerce® trademarks are the intellectual property of WooCommerce, Inc. Uses of the WordPress®, Woo®, and WooCommerce® names in this website are for identification purposes only and do not imply an endorsement by WordPress Foundation or WooCommerce, Inc. WP Engine is not endorsed or owned by, or affiliated with, the WordPress Foundation or WooCommerce, Inc.