Nectarblocks Documentation
website·Indexed 34 days ago
https://docs.nectarblocks.comDocumentation for Nectarblocks, a WordPress Gutenberg editor extension. Covers block controls for CSS properties, dynamic data integration with ACF and custom post types, Theme Builder for Archive and Single templates, and the Template Library. Includes guides on plugin installation, import/export tools, and system requirements such as PHP 8.0+.
What's inside Nectarblocks
- Nectarblocks provides a GSAP-powered animation system for WordPress Gutenberg blocks. It allows developers to combine different trigger types on a single block (e.g., a 'Scroll Into View' entrance and an 'Interaction' hover effect). Key features include per-property timing, spring physics for bouncy motion, 3D transforms with perspective, and color animation for text and backgrounds.
Use Nectarblocks Theme Builder to design site templates
The Theme Builder allows you to design structural templates for your site—including headers, footers, blog/archive layouts, 404 pages, and WooCommerce pages—using Nectar blocks. Templates are edited in the WordPress block editor and applied based on defined display conditions. This is distinct from the Template Library (pre-built page designs) and Global Sections (reusable content injected at theme hooks).Use the Nectar Text block for flexible typography
The Nectar Text block is a versatile element designed for all text displays on a site. It features unique inline controls for SEO and visual impact, as well as specialized letter-by-letter animations.Set up the Video Lightbox block
The Video Lightbox block triggers a video in an overlay lightbox. It allows for a customizable preview and an interactive play button.Access the Nectarblocks Getting Started guide
The Getting Started tab provides an introduction to the block collection, template library, global settings, responsive editing, and Unsplash integration via video previews.
To access it:
- Open Nectarblocks from the WordPress admin left sidebar or toolbar.
- The Getting Started tab is selected by default upon opening the panel.
Understand the difference between Nectarblocks Plugin and Theme
Nectarblocks offers both a plugin and a theme, which serve different purposes:
- Nectarblocks Plugin: A collection of blocks, templates, and controls compatible with any WordPress theme. It is used primarily for creating page and post content.
- Nectarblocks Theme: A companion theme designed for optimal compatibility. It provides global design controls (header navigation, typography, colors) and site-wide templates. It includes a Visual Hook System for adding global content (like footers or banners) without editing theme files.
Note: While third-party themes can be used with the plugin, the Nectarblocks theme is recommended for the best experience and is required to use the Demo Importer functionality.
Create and manage Global Sections
Global Sections are a special Post Type used for content repeated across multiple pages (e.g., footers, CTAs). This feature requires the Nectarblocks Theme. Global Sections are managed via WP Admin → Global Sections. Each section includes metaboxes for Display Locations and Display Conditions to control visibility.Handle Header State overrides in Navigation
When a Navigation block is placed inside a Header Navigation template part, it supports state-specific styling. A badge in the panel indicates the current state:Default,Transparent,Scrolled, orOverlay Menu. Any styling control in the panel can be overridden for a specific state; these overrides can be reset to the base value using the reset action on the control.Use WordPress Custom Fields as Dynamic Data
Plain post meta added via the block editor's Custom Fields panel or
add_post_meta()appears under the Custom Fields group in the dynamic data picker.Important Notes:
- Enable the Custom Fields panel in the editor via Preferences $\rightarrow$ Panels.
- The field must have a value assigned to at least one post before it will appear in the picker when editing a template.
Create a Single Template with Theme Builder
Single templates define the layout for individual entries, such as a single blog article or a custom post type item. Note: This feature requires the Nectarblocks theme to be installed.
Steps to create a Single Template:
- Go to the
Templatespage in the WordPress admin. - Name the template.
- In the right sidebar, open the
Templatetab and selectSingle. - Add content using dynamic data types to pull content from the post.
In the editor, fields using the "Current Post" data type appear as placeholders. These placeholders render the actual content of the specific post being viewed on the frontend.
- Go to the
Implement Dynamic Videos in Nectarblocks
The Video data type populates video sources from the WordPress database. It is available for theVideo Playerblock and the Video background control inColumn,Row, andFlexboxblocks. Video sources must come from custom fields (e.g., ACFfileorurlfields) as built-in post fields do not support video.Loop through data using Post Grid or Query Loop blocks
Nectarblocks provides two methods to render lists of items using Dynamic Data:
- Post Grid Block: Best for standard grids. Layout is handled automatically. Use the
Contenttab to select post types and add custom fields as repeaters. Useful for creating Archive Templates. - Query Loop Block: A flexible WordPress block that allows looping through various data sources (posts, pages, CPTs) and integrating any Nectarblocks Data Type.
- Post Grid Block: Best for standard grids. Layout is handled automatically. Use the