---
name: _acf-blocks-for-writing
description: Quick reference for ACF blocks commonly used in blog content. Copy-paste ready syntax.
---

# ACF Blocks for Writing

Quick reference for content blocks. For full documentation, see `/resources/wp-blocks/`.

---

## Accordion (FAQs)

**Use for:** FAQ sections with schema markup

```html
<!-- wp:acf/accordion {"name":"acf/accordion","data":{"acf_accord_enable_faq_schema":"1","_acf_accord_enable_faq_schema":"field_acf_accord_enable_faq_schema","acf_accord_groups":"3","_acf_accord_groups":"field_acf_accord_groups","acf_accord_groups_0_acf_accord_group_title":"Question 1?","_acf_accord_groups_0_acf_accord_group_title":"field_acf_accord_group_title","acf_accord_groups_0_acf_accord_group_content":"<p>Answer 1.</p>","_acf_accord_groups_0_acf_accord_group_content":"field_acf_accord_group_content","acf_accord_groups_1_acf_accord_group_title":"Question 2?","_acf_accord_groups_1_acf_accord_group_title":"field_acf_accord_group_title","acf_accord_groups_1_acf_accord_group_content":"<p>Answer 2.</p>","_acf_accord_groups_1_acf_accord_group_content":"field_acf_accord_group_content","acf_accord_groups_2_acf_accord_group_title":"Question 3?","_acf_accord_groups_2_acf_accord_group_title":"field_acf_accord_group_title","acf_accord_groups_2_acf_accord_group_content":"<p>Answer 3.</p>","_acf_accord_groups_2_acf_accord_group_content":"field_acf_accord_group_content"},"mode":"preview"} /-->
```

**Key points:**
- Set `acf_accord_groups` to total question count (as string)
- Index questions from 0: `acf_accord_groups_0_`, `acf_accord_groups_1_`, etc.
- Wrap answers in `<p>` tags
- Enable FAQ schema with `acf_accord_enable_faq_schema":"1"`
- Keep on single line (no line breaks)

---

## Pros & Cons

**Use for:** Quick pros/cons summary mid-article or in reviews

```html
<!-- wp:acf/pros-cons {"name":"acf/pros-cons","data":{"pc_show_first":"positive","pc_pros_title":"What I Like","pc_pros_list":"<ul>\n<li>Pro item 1</li>\n<li>Pro item 2</li>\n<li>Pro item 3</li>\n</ul>","pc_cons_title":"What Could Be Better","pc_cons_list":"<ul>\n<li>Con item 1</li>\n<li>Con item 2</li>\n</ul>"}} /-->
```

**Key points:**
- Use `<ul><li>` markup for lists
- `pc_show_first`: `"positive"` or `"negative"`
- Default colors: green for pros, red for cons

---

## Call to Action (CTA)

**Use for:** Encouraging action after verdict/recommendation

```html
<!-- wp:acf/cta {"name":"acf/cta","data":{"acf_cta_heading":"Ready to Get Started?","acf_cta_description":"<p>Join thousands already using this tool.</p>","acf_cta_button_text":"Try It Free","acf_cta_button_url":"https://gauravtiwari.org/go/product/","acf_cta_button_style":"primary"}} /-->
```

**Button styles:** `"primary"`, `"secondary"`, `"outline"`

---

## Product Review

**Use for:** Full product review with rating, pros/cons, and schema

```html
<!-- wp:acf/product-review {"name":"acf/product-review","data":{"field_pr_product_name":"Product Name","field_pr_show_title":"1","field_pr_product_image_url":"https://example.com/image.png","field_pr_overall_rating":"4.5","field_pr_summary":"Brief summary of the product and verdict.","field_pr_features":{"row-0":{"field_pr_feature_name":"Feature 1","field_pr_feature_rating":"4.5"},"row-1":{"field_pr_feature_name":"Feature 2","field_pr_feature_rating":"5"}},"field_pr_pros":{"row-0":{"field_pr_pro_text":"Pro 1"},"row-1":{"field_pr_pro_text":"Pro 2"}},"field_pr_cons":{"row-0":{"field_pr_con_text":"Con 1"}},"field_pr_offer_url":"https://gauravtiwari.org/go/product/","field_pr_offer_cta_text":"Get Product","field_pr_link_rel":"nofollow sponsored","field_pr_link_target":"_blank","field_pr_offer_price_currency":"USD","field_pr_offer_price":"49","field_pr_payment_term":"/year","field_pr_price_valid_until":"2026-12-31","field_pr_enable_json_ld":"1","field_pr_author_name":"Gaurav Tiwari","field_pr_date_modified":"2026-01-15","field_pr_brand":"Brand Name","field_pr_availability":"InStock"}} /-->
```

**Key points:**
- Overall rating: 1-5, step 0.1 (e.g., "4.6")
- Feature ratings: 1-5, step 0.5 only (e.g., "4.5", not "4.6")
- Date format: `Y-m-d` (e.g., "2026-01-15")
- Repeater rows: `row-0`, `row-1`, etc. (sequential, no gaps)

---

## Compare

**Use for:** Side-by-side comparison tables

```html
<!-- wp:acf/compare {"name":"acf/compare","data":{"comp_columns":"2","comp_columns_data":{"row-0":{"comp_title":"Free Plan","comp_title_bg":"#f0f0f0","comp_title_color":"#333333","comp_text":"Best for personal use","comp_repeater_list":{"row-0":{"comp_list_item":"1 website"},"row-1":{"comp_list_item":"Basic features"},"row-2":{"comp_list_item":"Community support"}}},"row-1":{"comp_title":"Pro Plan","comp_title_bg":"#0073aa","comp_title_color":"#ffffff","comp_text":"Best for businesses","comp_repeater_list":{"row-0":{"comp_list_item":"Unlimited websites"},"row-1":{"comp_list_item":"All features"},"row-2":{"comp_list_item":"Priority support"}}}},"comp_cta_text":"Compare Plans","comp_cta_url":"https://example.com/pricing"}} /-->
```

---

## Callout

**Use for:** Highlighting important notes, warnings, tips

```html
<!-- wp:acf/callout {"name":"acf/callout","data":{"callout_type":"info","callout_title":"Note","callout_content":"<p>Important information here.</p>"}} /-->
```

**Callout types:** `"info"`, `"warning"`, `"success"`, `"error"`

---

## Code Block

**Use for:** Code snippets with syntax highlighting

```html
<!-- wp:acf/code {"name":"acf/code","data":{"code_language":"php","code_content":"add_filter( 'rank_math/frontend/breadcrumb/args', function( $args ) {\n    $args['separator'] = ' › ';\n    return $args;\n});","code_filename":"functions.php","code_show_line_numbers":"1"}} /-->
```

**Languages:** `php`, `javascript`, `css`, `html`, `bash`, `json`, `sql`

---

## Steps

**Use for:** Numbered step-by-step instructions

```html
<!-- wp:acf/steps {"name":"acf/steps","data":{"steps_title":"How to Install","steps_items":{"row-0":{"steps_item_title":"Download the plugin","steps_item_content":"<p>Go to Plugins → Add New and search for the plugin name.</p>"},"row-1":{"steps_item_title":"Activate","steps_item_content":"<p>Click Activate after installation completes.</p>"},"row-2":{"steps_item_title":"Configure settings","steps_item_content":"<p>Navigate to Settings and configure your preferences.</p>"}}}} /-->
```

---

## Checklist

**Use for:** Requirements, prerequisites, verification lists

```html
<!-- wp:acf/checklist {"name":"acf/checklist","data":{"checklist_title":"Before You Start","checklist_items":{"row-0":{"checklist_item":"WordPress 6.0 or higher"},"row-1":{"checklist_item":"PHP 8.0 or higher"},"row-2":{"checklist_item":"Admin access to your site"}}}} /-->
```

---

## Opinion Box

**Use for:** Personal takes, recommendations, editorial comments

```html
<!-- wp:acf/opinion-box {"name":"acf/opinion-box","data":{"opinion_title":"My Take","opinion_content":"<p>After using this for 3 years, here's what I think...</p>","opinion_author":"Gaurav Tiwari"}} /-->
```

---

## Quick Reference: When to Use What

| Situation | Block |
|-----------|-------|
| FAQ section at end of article | Accordion |
| Quick summary of pros/cons | Pros & Cons |
| Final recommendation with button | CTA |
| Full product review with rating | Product Review |
| Compare two plans/products | Compare |
| Important note or warning | Callout |
| Show code with highlighting | Code |
| Step-by-step instructions | Steps |
| Prerequisites or requirements | Checklist |
| Personal opinion callout | Opinion Box |

---

## Block Placement Guidelines

### Reviews

1. **Pros/Cons block** - After "What [Product] Does Well/Doesn't Do Well" sections
2. **Product Review block** - After verdict text, before FAQs
3. **CTA block** - After Product Review block
4. **Accordion block** - FAQ section at end

### Tutorials

1. **Checklist block** - Prerequisites section
2. **Steps block** - Main tutorial content (or use H2/H3 with manual numbering)
3. **Code blocks** - For code snippets
4. **Callout blocks** - Warnings, tips, important notes
5. **Accordion block** - FAQ section at end

### How-To Guides

1. **Callout block** - Quick answer/TL;DR
2. **Steps block** - Each method's process
3. **Compare block** - Method comparison table
4. **Accordion block** - FAQ section at end

### Blog Articles

1. **Callout blocks** - Key points, warnings
2. **Opinion Box** - Personal takes
3. **Accordion block** - FAQ section at end

---

## Common Mistakes

1. **Line breaks in block JSON** - Keep blocks on single line
2. **Wrong date format** - Use `Y-m-d` (2026-01-15), not Ymd (20260115)
3. **Feature ratings with wrong step** - Use 0.5 increments (4.5), not 0.1 (4.6)
4. **Missing underscore fields** - Include `_field_name` for each `field_name`
5. **Non-sequential row keys** - Must be `row-0`, `row-1`, `row-2` with no gaps
6. **Numbers as integers** - All values must be strings: `"4.5"` not `4.5`
