{"id":34622470,"url":"https://github.com/wpgaurav/acf-blocks-plugin","last_synced_at":"2026-04-01T18:06:11.981Z","repository":{"id":329972133,"uuid":"1121157193","full_name":"wpgaurav/acf-blocks-plugin","owner":"wpgaurav","description":"A comprehensive WordPress plugin that provides a collection of reusable, customizable ACF Pro blocks for the block editor. Uses ACF Block Version 3 with automatic field group registration.","archived":false,"fork":false,"pushed_at":"2026-03-27T18:10:13.000Z","size":837,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-28T02:05:12.291Z","etag":null,"topics":["acf-addon","acf-block","acf-block-v3","acf-blocks","acf-pro","advanced-custom-fields","content-marketing","wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":"https://gauravtiwari.org/my-wordpress-block-editor-setup/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wpgaurav.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-22T14:27:12.000Z","updated_at":"2026-03-27T18:09:51.000Z","dependencies_parsed_at":"2026-02-15T04:01:43.684Z","dependency_job_id":null,"html_url":"https://github.com/wpgaurav/acf-blocks-plugin","commit_stats":null,"previous_names":["wpgaurav/acf-blocks-plugin"],"tags_count":77,"template":false,"template_full_name":null,"purl":"pkg:github/wpgaurav/acf-blocks-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpgaurav%2Facf-blocks-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpgaurav%2Facf-blocks-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpgaurav%2Facf-blocks-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpgaurav%2Facf-blocks-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wpgaurav","download_url":"https://codeload.github.com/wpgaurav/acf-blocks-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpgaurav%2Facf-blocks-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290749,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["acf-addon","acf-block","acf-block-v3","acf-blocks","acf-pro","advanced-custom-fields","content-marketing","wordpress","wordpress-plugin"],"created_at":"2025-12-24T15:33:50.970Z","updated_at":"2026-04-01T18:06:11.954Z","avatar_url":"https://github.com/wpgaurav.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ACF Blocks Plugin\n\nA comprehensive WordPress plugin that provides a collection of reusable, customizable ACF Pro blocks for the block editor. Uses ACF Block Version 3 with automatic field group registration.\n\n## Features\n\n- **Plugin Architecture**: Standalone WordPress plugin - no theme modifications required\n- **Automatic Field Groups**: Field groups are registered automatically from JSON - no manual imports needed\n- **Modern Block Registration**: Uses ACF Block v3 with block.json metadata\n- **Zero-JavaScript Accordions**: Uses native HTML `\u003cdetails\u003e`/`\u003csummary\u003e` elements for accordion blocks\n- **Conditional Asset Loading**: CSS and JS only load when blocks are actually used on the page\n- **Modular Architecture**: Each block is self-contained with its own template, styles, and configuration\n- **ACF Pro Compatible**: Requires ACF Pro 6.0+ for full functionality\n\n## Requirements\n\n- WordPress 6.0+\n- PHP 7.4+\n- [Advanced Custom Fields Pro](https://www.advancedcustomfields.com/) 6.0+\n\n## Installation\n\n1. Download the plugin and upload to `wp-content/plugins/acf-blocks-plugin/`\n2. Activate the plugin through the WordPress admin\n3. Ensure ACF Pro is installed and activated\n4. Start using blocks in the block editor!\n\nNo additional configuration required - field groups are automatically registered.\n\n## Available Blocks\n\n### Content Blocks\n- **Accordion Block** (`acf/accordion`) - Collapsible content with FAQ schema support (searchable by \"FAQ\")\n- **Testimonial Block** (`acf/testimonial`) - Customer testimonials with ratings\n- **Hero Block** (`acf/hero`) - Hero section with headline, image, and CTA\n- **CTA Block** (`acf/cta`) - Call-to-action with heading and button\n- **Callout Block** (`acf/callout`) - Highlighted callout boxes\n- **Opinion Box** (`acf/opinion-box`) - Editorial content with author\n\n### Product \u0026 E-Commerce\n- **Product Review** (`acf/product-review`) - Reviews with star ratings and schema\n- **Product Cards** (`acf/product-cards`) - Product showcase cards\n- **Product Box** (`acf/product-box`) - Single product display with CTA buttons\n- **Coupon Code** (`acf/cb-coupon-code`) - Promotional code display with copy feature\n- **Compare Block** (`acf/compare`) - Side-by-side comparisons\n- **PL Block** (`acf/pl-block`) - Product lists with pricing\n\n### Media \u0026 Display\n- **Video Block** (`acf/video`) - Video embeds\n- **Gallery Block** (`acf/gallery`) - Image galleries\n- **Stats Block** (`acf/stats`) - Statistics display\n- **Star Rating** (`acf/star-rating`) - Interactive ratings with AJAX submission\n\n### Navigation \u0026 Organization\n- **Tabs Block** (`acf/tabs`) - Tabbed content with multiple styles\n- **Feature Grid** (`acf/feature-grid`) - Grid layout for features\n- **Section Block** (`acf/section-block`) - Container wrapper with InnerBlocks\n- **Post Display** (`acf/post-display`) - Custom post listings\n\n### Team \u0026 Forms\n- **Team Member** (`acf/team-member`) - Team member profiles\n- **Email Form** (`acf/email-form`) - Email capture forms\n- **Thread Builder** (`acf/thread-builder`) - Discussion thread layouts\n\n## Block Structure\n\nEach block follows a consistent directory structure:\n\n```\nblocks/\n  block-name/\n    ├── block.json          # Block metadata (required)\n    ├── block-name.php      # Render template (required)\n    ├── block-data.json     # ACF field group (auto-registered)\n    ├── block-name.css      # Styles (conditionally loaded)\n    └── extra.php           # Additional hooks (optional)\n```\n\n## Key Features\n\n### Automatic Field Group Registration\n\nField groups are defined in JSON files (`block-data.json` or similar) within each block folder. These are automatically registered with ACF Pro when the plugin loads - no need to import/export through the ACF admin.\n\n### Native HTML Accordions\n\nThe Accordion block uses native HTML `\u003cdetails\u003e` and `\u003csummary\u003e` elements instead of JavaScript-based solutions. This provides:\n- Zero JavaScript required\n- Native keyboard accessibility\n- Built-in browser support\n- Reduced page weight\n\n### Conditional Asset Loading\n\nCSS files are only enqueued when their respective blocks are used on a page, reducing unnecessary asset loading for better performance.\n\n## Creating Custom Blocks\n\n1. Create a new directory in `blocks/`:\n   ```bash\n   mkdir blocks/my-block\n   ```\n\n2. Create `block.json`:\n   ```json\n   {\n     \"apiVersion\": 3,\n     \"name\": \"acf/my-block\",\n     \"title\": \"My Block\",\n     \"description\": \"Description here\",\n     \"category\": \"common\",\n     \"icon\": \"admin-post\",\n     \"keywords\": [\"custom\"],\n     \"acf\": {\n       \"renderTemplate\": \"my-block.php\",\n       \"blockVersion\": 3\n     },\n     \"supports\": {\n       \"align\": true,\n       \"mode\": true,\n       \"jsx\": true\n     }\n   }\n   ```\n\n3. Create `block-data.json` with your ACF field group configuration.\n\n4. Create `my-block.php` render template.\n\n5. Optionally add `my-block.css` for styles.\n\nThe block will be automatically registered on the next page load.\n\n## CSS Class Naming Convention\n\nAll blocks use the `acf-` prefix for CSS classes to avoid conflicts with other plugins and themes. For example:\n- `.acf-accordion` - Accordion block container\n- `.acf-testimonial-block` - Testimonial block container\n- `.acf-hero-block` - Hero block container\n\nThis ensures styles are properly scoped and won't interfere with your theme's styling.\n\n## Development\n\nEnable debug mode for detailed error logging:\n\n```php\ndefine( 'WP_DEBUG', true );\ndefine( 'WP_DEBUG_LOG', true );\n```\n\n## License\n\nGPL v2 or later\n\n## Credits\n\nBuilt for [Advanced Custom Fields Pro](https://www.advancedcustomfields.com/) and WordPress block editor.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpgaurav%2Facf-blocks-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwpgaurav%2Facf-blocks-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpgaurav%2Facf-blocks-plugin/lists"}