claude-plugin-wordpress-manager 1.5.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +2 -2
- package/CHANGELOG.md +92 -0
- package/agents/wp-accessibility-auditor.md +206 -0
- package/agents/wp-content-strategist.md +18 -0
- package/agents/wp-deployment-engineer.md +34 -2
- package/agents/wp-performance-optimizer.md +12 -0
- package/agents/wp-security-auditor.md +20 -0
- package/agents/wp-security-hardener.md +266 -0
- package/agents/wp-site-manager.md +14 -0
- package/agents/wp-test-engineer.md +207 -0
- package/docs/guides/INDEX.md +46 -0
- package/docs/guides/wp-blog.md +590 -0
- package/docs/guides/wp-design-system.md +976 -0
- package/docs/guides/wp-ecommerce.md +786 -0
- package/docs/guides/wp-landing-page.md +762 -0
- package/docs/guides/wp-portfolio.md +713 -0
- package/docs/plans/2026-02-27-design-system-guide-design.md +30 -0
- package/docs/plans/2026-02-27-site-type-guides-design.md +44 -0
- package/package.json +2 -2
- package/skills/wordpress-router/references/decision-tree.md +12 -2
- package/skills/wp-accessibility/SKILL.md +170 -0
- package/skills/wp-accessibility/references/a11y-audit-tools.md +248 -0
- package/skills/wp-accessibility/references/a11y-testing.md +222 -0
- package/skills/wp-accessibility/references/block-a11y.md +247 -0
- package/skills/wp-accessibility/references/interactive-a11y.md +272 -0
- package/skills/wp-accessibility/references/media-a11y.md +254 -0
- package/skills/wp-accessibility/references/theme-a11y.md +309 -0
- package/skills/wp-audit/SKILL.md +4 -0
- package/skills/wp-block-development/SKILL.md +5 -0
- package/skills/wp-block-themes/SKILL.md +4 -0
- package/skills/wp-e2e-testing/SKILL.md +186 -0
- package/skills/wp-e2e-testing/references/ci-integration.md +174 -0
- package/skills/wp-e2e-testing/references/jest-wordpress.md +114 -0
- package/skills/wp-e2e-testing/references/phpunit-wordpress.md +141 -0
- package/skills/wp-e2e-testing/references/playwright-wordpress.md +108 -0
- package/skills/wp-e2e-testing/references/test-data-generation.md +127 -0
- package/skills/wp-e2e-testing/references/visual-regression.md +107 -0
- package/skills/wp-e2e-testing/references/wp-env-setup.md +97 -0
- package/skills/wp-e2e-testing/scripts/test_inspect.mjs +375 -0
- package/skills/wp-headless/SKILL.md +168 -0
- package/skills/wp-headless/references/api-layer-choice.md +160 -0
- package/skills/wp-headless/references/cors-config.md +245 -0
- package/skills/wp-headless/references/frontend-integration.md +331 -0
- package/skills/wp-headless/references/headless-auth.md +286 -0
- package/skills/wp-headless/references/webhooks.md +277 -0
- package/skills/wp-headless/references/wpgraphql.md +331 -0
- package/skills/wp-headless/scripts/headless_inspect.mjs +321 -0
- package/skills/wp-i18n/SKILL.md +170 -0
- package/skills/wp-i18n/references/js-i18n.md +201 -0
- package/skills/wp-i18n/references/multilingual-setup.md +219 -0
- package/skills/wp-i18n/references/php-i18n.md +196 -0
- package/skills/wp-i18n/references/rtl-support.md +206 -0
- package/skills/wp-i18n/references/translation-workflow.md +178 -0
- package/skills/wp-i18n/references/wpcli-i18n.md +177 -0
- package/skills/wp-i18n/scripts/i18n_inspect.mjs +330 -0
- package/skills/wp-interactivity-api/SKILL.md +4 -0
- package/skills/wp-plugin-development/SKILL.md +6 -0
- package/skills/wp-rest-api/SKILL.md +4 -0
- package/skills/wp-security/SKILL.md +179 -0
- package/skills/wp-security/references/api-restriction.md +147 -0
- package/skills/wp-security/references/authentication-hardening.md +105 -0
- package/skills/wp-security/references/filesystem-hardening.md +105 -0
- package/skills/wp-security/references/http-headers.md +105 -0
- package/skills/wp-security/references/incident-response.md +144 -0
- package/skills/wp-security/references/user-capabilities.md +115 -0
- package/skills/wp-security/references/wp-config-security.md +129 -0
- package/skills/wp-security/scripts/security_inspect.mjs +393 -0
|
@@ -0,0 +1,713 @@
|
|
|
1
|
+
# WordPress Portfolio — Guida Completa
|
|
2
|
+
|
|
3
|
+
**Tipologia:** Portfolio (vetrina lavori, case study, progetti)
|
|
4
|
+
**Versione:** 1.0.0
|
|
5
|
+
**Ultima modifica:** 2026-02-28
|
|
6
|
+
**Skill correlate:** wp-block-themes, wp-local-env, wp-deploy, wp-block-development, wp-interactivity-api
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 1. Panoramica
|
|
11
|
+
|
|
12
|
+
### Cos'e un Portfolio WordPress
|
|
13
|
+
|
|
14
|
+
Un portfolio WordPress e un sito web centrato sulla presentazione visiva dei propri lavori e progetti. A differenza di un blog (contenuto testuale) o di un e-commerce (vendita prodotti), un portfolio mette al centro le immagini e i risultati, con il testo che funge da supporto narrativo.
|
|
15
|
+
|
|
16
|
+
### Quando usare un portfolio
|
|
17
|
+
|
|
18
|
+
- **Freelancer/developer**: mostrare progetti web, app, contributi open source
|
|
19
|
+
- **Designer**: presentare lavori grafici, branding, UI/UX
|
|
20
|
+
- **Fotografo**: gallerie fotografiche, shooting, reportage
|
|
21
|
+
- **Architetto/interior designer**: rendering, progetti completati
|
|
22
|
+
- **Agenzia**: case study per acquisire nuovi clienti
|
|
23
|
+
|
|
24
|
+
### Varianti
|
|
25
|
+
|
|
26
|
+
| Variante | Focus | Esempio |
|
|
27
|
+
|----------|-------|---------|
|
|
28
|
+
| **Fotografico** | Gallerie immersive, full-bleed | Fotografo matrimonialista |
|
|
29
|
+
| **Design/UI** | Mockup, process, before/after | UI/UX designer |
|
|
30
|
+
| **Sviluppo** | Codice, architettura, tech stack | Developer freelance |
|
|
31
|
+
| **Architettura** | Planimetrie, rendering 3D, foto | Studio architettura |
|
|
32
|
+
| **Multi-disciplinare** | Mix di tipologie | Agenzia creativa |
|
|
33
|
+
|
|
34
|
+
### Metriche chiave
|
|
35
|
+
|
|
36
|
+
| Metrica | Cosa misura | Tool |
|
|
37
|
+
|---------|-------------|------|
|
|
38
|
+
| Tempo sulla pagina progetto | Interesse per il lavoro | Google Analytics |
|
|
39
|
+
| CTR contatti | % che clicca su CTA contatto | Google Analytics |
|
|
40
|
+
| Pagine per sessione | Esplorazione del portfolio | Google Analytics |
|
|
41
|
+
| Download CV/PDF | Interesse professionale | Google Analytics |
|
|
42
|
+
| Bounce rate homepage | Prima impressione | Google Analytics |
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## 2. Per l'Utente
|
|
47
|
+
|
|
48
|
+
Questa sezione copre la gestione operativa del portfolio tramite Claude Code e il plugin wordpress-manager.
|
|
49
|
+
|
|
50
|
+
### 2.1 Concept e Pianificazione
|
|
51
|
+
|
|
52
|
+
**Seleziona i lavori migliori, non tutti i lavori.**
|
|
53
|
+
|
|
54
|
+
1. **Selezione**: mostra 6-12 progetti migliori, non 50 mediocri
|
|
55
|
+
2. **Categorizzazione**: organizza per tipologia (web, brand, app) e tecnologia (React, WordPress, Figma)
|
|
56
|
+
3. **Case study**: per almeno 3 progetti, racconta la storia (sfida → soluzione → risultato)
|
|
57
|
+
4. **About page**: non e un CV — e una narrazione che crea connessione
|
|
58
|
+
5. **CTA**: ogni progetto deve portare a contatto o al progetto successivo
|
|
59
|
+
|
|
60
|
+
### 2.2 Setup Ambiente Locale
|
|
61
|
+
|
|
62
|
+
**Creare un portfolio WordPress locale con wp-env:**
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# 1. Creare la directory del progetto
|
|
66
|
+
mkdir -p ~/projects/mio-portfolio
|
|
67
|
+
cd ~/projects/mio-portfolio
|
|
68
|
+
|
|
69
|
+
# 2. Creare .wp-env.json
|
|
70
|
+
cat > .wp-env.json << 'EOF'
|
|
71
|
+
{
|
|
72
|
+
"core": "WordPress/WordPress#master",
|
|
73
|
+
"themes": ["./themes/portfolio-theme"],
|
|
74
|
+
"plugins": ["./plugins/portfolio-cpt"],
|
|
75
|
+
"config": {
|
|
76
|
+
"WP_DEBUG": true,
|
|
77
|
+
"WP_DEBUG_LOG": true,
|
|
78
|
+
"SCRIPT_DEBUG": true
|
|
79
|
+
},
|
|
80
|
+
"port": 8888
|
|
81
|
+
}
|
|
82
|
+
EOF
|
|
83
|
+
|
|
84
|
+
# 3. Creare la struttura
|
|
85
|
+
mkdir -p themes/portfolio-theme/{templates,parts,patterns,assets/css}
|
|
86
|
+
mkdir -p plugins/portfolio-cpt
|
|
87
|
+
|
|
88
|
+
# 4. Avviare WordPress
|
|
89
|
+
npx wp-env start
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Con Claude Code (linguaggio naturale):**
|
|
93
|
+
|
|
94
|
+
> "Crea un progetto WordPress portfolio con wp-env, tema minimale bianco con accent blu, custom post type 'progetto' con tassonomie tipo_progetto e tecnologia"
|
|
95
|
+
|
|
96
|
+
**Credenziali default wp-env:** `admin` / `password` su `http://localhost:8888/wp-admin/`
|
|
97
|
+
|
|
98
|
+
### 2.3 Struttura Contenuti
|
|
99
|
+
|
|
100
|
+
#### Tassonomie
|
|
101
|
+
|
|
102
|
+
| Elemento | Scopo | Esempio |
|
|
103
|
+
|----------|-------|---------|
|
|
104
|
+
| **Tipo progetto** (tassonomia gerarchica) | Macro-categorie | Web Design, Branding, App, Fotografia |
|
|
105
|
+
| **Tecnologia** (tassonomia flat) | Stack tecnico | React, WordPress, Figma, Photoshop |
|
|
106
|
+
| **Anno** | Ordine cronologico | Campo custom o data pubblicazione |
|
|
107
|
+
|
|
108
|
+
#### Struttura del Case Study
|
|
109
|
+
|
|
110
|
+
Ogni progetto dovrebbe seguire questa narrazione:
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
1. SFIDA
|
|
114
|
+
"Il cliente aveva bisogno di..."
|
|
115
|
+
|
|
116
|
+
2. SOLUZIONE
|
|
117
|
+
"Ho progettato/sviluppato..."
|
|
118
|
+
|
|
119
|
+
3. RISULTATO
|
|
120
|
+
"Dopo il lancio, il traffico e aumentato del 40%..."
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### 2.4 Gestione Quotidiana
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# Creare un nuovo progetto
|
|
127
|
+
npx wp-env run cli wp post create \
|
|
128
|
+
--post_type=progetto \
|
|
129
|
+
--post_status=publish \
|
|
130
|
+
--post_title="Redesign Sito Web Azienda XYZ"
|
|
131
|
+
|
|
132
|
+
# Creare tassonomie
|
|
133
|
+
npx wp-env run cli wp term create tipo_progetto "Web Design"
|
|
134
|
+
npx wp-env run cli wp term create tipo_progetto "Branding"
|
|
135
|
+
npx wp-env run cli wp term create tipo_progetto "App"
|
|
136
|
+
npx wp-env run cli wp term create tecnologia "React"
|
|
137
|
+
npx wp-env run cli wp term create tecnologia "WordPress"
|
|
138
|
+
npx wp-env run cli wp term create tecnologia "Figma"
|
|
139
|
+
|
|
140
|
+
# Assegnare tassonomia a un progetto
|
|
141
|
+
npx wp-env run cli wp term set 5 tipo_progetto "Web Design"
|
|
142
|
+
npx wp-env run cli wp term set 5 tecnologia "React" "WordPress"
|
|
143
|
+
|
|
144
|
+
# Elencare tutti i progetti
|
|
145
|
+
npx wp-env run cli wp post list --post_type=progetto --fields=ID,post_title,post_status
|
|
146
|
+
|
|
147
|
+
# Importare immagini
|
|
148
|
+
npx wp-env run cli wp media import https://picsum.photos/800/600 --title="Demo Project 1"
|
|
149
|
+
|
|
150
|
+
# Flush rewrite rules (dopo registrazione CPT)
|
|
151
|
+
npx wp-env run cli wp rewrite flush --hard
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### 2.5 SEO per Portfolio
|
|
155
|
+
|
|
156
|
+
- **Title tag**: nome progetto + tipo + tuo nome (es. "Redesign Sito XYZ | Web Design | Mario Rossi")
|
|
157
|
+
- **Alt text**: descrittivo su OGNI immagine (critico per portfolio)
|
|
158
|
+
- **Schema markup**: `CreativeWork` per i progetti
|
|
159
|
+
- **Open Graph**: immagine del progetto per condivisione social
|
|
160
|
+
- **Slug**: `/progetti/redesign-sito-xyz/` — breve e descrittivo
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
npx wp-env run cli wp rewrite structure '/%postname%/'
|
|
164
|
+
npx wp-env run cli wp rewrite flush --hard
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## 3. Per lo Sviluppatore
|
|
170
|
+
|
|
171
|
+
Questa sezione copre l'architettura tecnica per sviluppare un block theme per portfolio.
|
|
172
|
+
|
|
173
|
+
### 3.1 Custom Post Type e Tassonomie
|
|
174
|
+
|
|
175
|
+
Il portfolio richiede un CPT dedicato. Crea un plugin separato dal tema:
|
|
176
|
+
|
|
177
|
+
**plugins/portfolio-cpt/portfolio-cpt.php**
|
|
178
|
+
|
|
179
|
+
```php
|
|
180
|
+
<?php
|
|
181
|
+
/**
|
|
182
|
+
* Plugin Name: Portfolio CPT
|
|
183
|
+
* Description: Custom Post Type "Progetto" con tassonomie per portfolio.
|
|
184
|
+
*/
|
|
185
|
+
|
|
186
|
+
function portfolio_register_post_type() {
|
|
187
|
+
register_post_type('progetto', [
|
|
188
|
+
'labels' => [
|
|
189
|
+
'name' => 'Progetti',
|
|
190
|
+
'singular_name' => 'Progetto',
|
|
191
|
+
'add_new_item' => 'Aggiungi Nuovo Progetto',
|
|
192
|
+
'edit_item' => 'Modifica Progetto',
|
|
193
|
+
'view_item' => 'Vedi Progetto',
|
|
194
|
+
],
|
|
195
|
+
'public' => true,
|
|
196
|
+
'has_archive' => true,
|
|
197
|
+
'rewrite' => ['slug' => 'progetti'],
|
|
198
|
+
'show_in_rest' => true,
|
|
199
|
+
'supports' => ['title', 'editor', 'thumbnail', 'excerpt', 'custom-fields', 'page-attributes'],
|
|
200
|
+
'menu_icon' => 'dashicons-portfolio',
|
|
201
|
+
'template' => [
|
|
202
|
+
['core/paragraph', ['placeholder' => 'Descrivi la sfida del progetto...']],
|
|
203
|
+
],
|
|
204
|
+
]);
|
|
205
|
+
}
|
|
206
|
+
add_action('init', 'portfolio_register_post_type');
|
|
207
|
+
|
|
208
|
+
function portfolio_register_taxonomies() {
|
|
209
|
+
register_taxonomy('tipo_progetto', 'progetto', [
|
|
210
|
+
'labels' => [
|
|
211
|
+
'name' => 'Tipi di Progetto',
|
|
212
|
+
'singular_name' => 'Tipo Progetto',
|
|
213
|
+
],
|
|
214
|
+
'hierarchical' => true,
|
|
215
|
+
'public' => true,
|
|
216
|
+
'rewrite' => ['slug' => 'tipo'],
|
|
217
|
+
'show_in_rest' => true,
|
|
218
|
+
'show_admin_column' => true,
|
|
219
|
+
]);
|
|
220
|
+
|
|
221
|
+
register_taxonomy('tecnologia', 'progetto', [
|
|
222
|
+
'labels' => [
|
|
223
|
+
'name' => 'Tecnologie',
|
|
224
|
+
'singular_name' => 'Tecnologia',
|
|
225
|
+
],
|
|
226
|
+
'hierarchical' => false,
|
|
227
|
+
'public' => true,
|
|
228
|
+
'rewrite' => ['slug' => 'tech'],
|
|
229
|
+
'show_in_rest' => true,
|
|
230
|
+
'show_admin_column' => true,
|
|
231
|
+
]);
|
|
232
|
+
}
|
|
233
|
+
add_action('init', 'portfolio_register_taxonomies');
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### 3.2 theme.json — Design Tokens per Portfolio
|
|
237
|
+
|
|
238
|
+
Un portfolio richiede colori neutri che non competano con i lavori presentati.
|
|
239
|
+
|
|
240
|
+
```json
|
|
241
|
+
{
|
|
242
|
+
"$schema": "https://schemas.wp.org/wp/6.7/theme.json",
|
|
243
|
+
"version": 3,
|
|
244
|
+
"settings": {
|
|
245
|
+
"color": {
|
|
246
|
+
"palette": [
|
|
247
|
+
{ "slug": "base", "color": "#ffffff", "name": "Base" },
|
|
248
|
+
{ "slug": "contrast", "color": "#111111", "name": "Contrast" },
|
|
249
|
+
{ "slug": "accent", "color": "#2563eb", "name": "Accent" },
|
|
250
|
+
{ "slug": "surface", "color": "#f5f5f5", "name": "Surface" },
|
|
251
|
+
{ "slug": "muted", "color": "#737373", "name": "Muted" },
|
|
252
|
+
{ "slug": "border", "color": "#e5e5e5", "name": "Border" }
|
|
253
|
+
],
|
|
254
|
+
"defaultPalette": false,
|
|
255
|
+
"defaultGradients": false
|
|
256
|
+
},
|
|
257
|
+
"typography": {
|
|
258
|
+
"fontFamilies": [
|
|
259
|
+
{
|
|
260
|
+
"fontFamily": "'Inter', -apple-system, sans-serif",
|
|
261
|
+
"slug": "body",
|
|
262
|
+
"name": "Body"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"fontFamily": "'Instrument Sans', 'Inter', sans-serif",
|
|
266
|
+
"slug": "heading",
|
|
267
|
+
"name": "Heading"
|
|
268
|
+
}
|
|
269
|
+
],
|
|
270
|
+
"fontSizes": [
|
|
271
|
+
{ "slug": "small", "size": "0.875rem" },
|
|
272
|
+
{ "slug": "medium", "size": "1rem" },
|
|
273
|
+
{ "slug": "large", "size": "1.25rem" },
|
|
274
|
+
{ "slug": "x-large", "size": "2rem" },
|
|
275
|
+
{ "slug": "xx-large", "size": "3rem" },
|
|
276
|
+
{ "slug": "huge", "size": "4rem" }
|
|
277
|
+
]
|
|
278
|
+
},
|
|
279
|
+
"layout": {
|
|
280
|
+
"contentSize": "1200px",
|
|
281
|
+
"wideSize": "1400px"
|
|
282
|
+
},
|
|
283
|
+
"blocks": {
|
|
284
|
+
"core/image": {
|
|
285
|
+
"lightbox": {
|
|
286
|
+
"enabled": true,
|
|
287
|
+
"allowEditing": true
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
"styles": {
|
|
293
|
+
"elements": {
|
|
294
|
+
"link": {
|
|
295
|
+
"color": { "text": "var(--wp--preset--color--accent)" },
|
|
296
|
+
":hover": { "color": { "text": "var(--wp--preset--color--contrast)" } }
|
|
297
|
+
},
|
|
298
|
+
"heading": {
|
|
299
|
+
"typography": {
|
|
300
|
+
"fontFamily": "var(--wp--preset--font-family--heading)",
|
|
301
|
+
"fontWeight": "600",
|
|
302
|
+
"lineHeight": "1.1"
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
"blocks": {
|
|
307
|
+
"core/image": {
|
|
308
|
+
"border": { "radius": "4px" }
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
**Nota**: il layout e piu largo (1200px) di un blog (720px) perche la griglia dei progetti ha bisogno di spazio. I colori sono neutri — i lavori devono essere gli unici elementi cromaticamente dominanti.
|
|
316
|
+
|
|
317
|
+
### 3.3 Templates
|
|
318
|
+
|
|
319
|
+
#### front-page.html — Homepage Showcase
|
|
320
|
+
|
|
321
|
+
```html
|
|
322
|
+
<!-- wp:template-part {"slug":"header","area":"header"} /-->
|
|
323
|
+
|
|
324
|
+
<!-- wp:group {"tagName":"main","layout":{"type":"constrained"}} -->
|
|
325
|
+
<main class="wp-block-group">
|
|
326
|
+
|
|
327
|
+
<!-- Hero intro -->
|
|
328
|
+
<!-- wp:group {"style":{"spacing":{"padding":{"top":"6rem","bottom":"4rem"}}}} -->
|
|
329
|
+
<div class="wp-block-group" style="padding-top:6rem;padding-bottom:4rem">
|
|
330
|
+
<!-- wp:heading {"level":1,"fontSize":"huge"} -->
|
|
331
|
+
<h1 class="wp-block-heading has-huge-font-size">Design & Sviluppo</h1>
|
|
332
|
+
<!-- /wp:heading -->
|
|
333
|
+
<!-- wp:paragraph {"textColor":"muted","fontSize":"large"} -->
|
|
334
|
+
<p class="has-muted-color has-text-color has-large-font-size">Portfolio di lavori selezionati. Ogni progetto racconta una sfida risolta.</p>
|
|
335
|
+
<!-- /wp:paragraph -->
|
|
336
|
+
</div>
|
|
337
|
+
<!-- /wp:group -->
|
|
338
|
+
|
|
339
|
+
<!-- Griglia progetti -->
|
|
340
|
+
<!-- wp:query {"queryId":1,"query":{"perPage":6,"postType":"progetto","orderby":"menu_order","order":"asc"}} -->
|
|
341
|
+
<div class="wp-block-query">
|
|
342
|
+
<!-- wp:post-template {"layout":{"type":"grid","columnCount":2}} -->
|
|
343
|
+
<!-- wp:group {"style":{"spacing":{"blockGap":"0.75rem"}}} -->
|
|
344
|
+
<div class="wp-block-group">
|
|
345
|
+
<!-- wp:post-featured-image {"isLink":true,"aspectRatio":"4/3","style":{"border":{"radius":"4px"}}} /-->
|
|
346
|
+
<!-- wp:post-title {"isLink":true,"fontSize":"large"} /-->
|
|
347
|
+
<!-- wp:post-terms {"term":"tipo_progetto","textColor":"muted","fontSize":"small"} /-->
|
|
348
|
+
</div>
|
|
349
|
+
<!-- /wp:group -->
|
|
350
|
+
<!-- /wp:post-template -->
|
|
351
|
+
</div>
|
|
352
|
+
<!-- /wp:query -->
|
|
353
|
+
|
|
354
|
+
<!-- Link a tutti i progetti -->
|
|
355
|
+
<!-- wp:group {"style":{"spacing":{"margin":{"top":"3rem"}}},"layout":{"type":"flex","justifyContent":"center"}} -->
|
|
356
|
+
<div class="wp-block-group" style="margin-top:3rem">
|
|
357
|
+
<!-- wp:paragraph -->
|
|
358
|
+
<p><a href="/progetti/">Vedi tutti i progetti →</a></p>
|
|
359
|
+
<!-- /wp:paragraph -->
|
|
360
|
+
</div>
|
|
361
|
+
<!-- /wp:group -->
|
|
362
|
+
|
|
363
|
+
</main>
|
|
364
|
+
<!-- /wp:group -->
|
|
365
|
+
|
|
366
|
+
<!-- wp:template-part {"slug":"footer","area":"footer"} /-->
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
#### archive-progetto.html — Archivio con Griglia
|
|
370
|
+
|
|
371
|
+
```html
|
|
372
|
+
<!-- wp:template-part {"slug":"header","area":"header"} /-->
|
|
373
|
+
|
|
374
|
+
<!-- wp:group {"tagName":"main","layout":{"type":"constrained"}} -->
|
|
375
|
+
<main class="wp-block-group">
|
|
376
|
+
|
|
377
|
+
<!-- wp:query-title {"type":"archive","style":{"spacing":{"margin":{"top":"3rem","bottom":"2rem"}}}} /-->
|
|
378
|
+
|
|
379
|
+
<!-- wp:query {"queryId":2,"query":{"perPage":12,"postType":"progetto","orderby":"menu_order","order":"asc","inherit":true}} -->
|
|
380
|
+
<div class="wp-block-query">
|
|
381
|
+
<!-- wp:post-template {"layout":{"type":"grid","columnCount":3}} -->
|
|
382
|
+
<!-- wp:group {"style":{"spacing":{"blockGap":"0.5rem"}}} -->
|
|
383
|
+
<div class="wp-block-group">
|
|
384
|
+
<!-- wp:post-featured-image {"isLink":true,"aspectRatio":"4/3","style":{"border":{"radius":"4px"}}} /-->
|
|
385
|
+
<!-- wp:post-title {"isLink":true,"fontSize":"medium"} /-->
|
|
386
|
+
<!-- wp:post-terms {"term":"tipo_progetto","textColor":"muted","fontSize":"small"} /-->
|
|
387
|
+
</div>
|
|
388
|
+
<!-- /wp:group -->
|
|
389
|
+
<!-- /wp:post-template -->
|
|
390
|
+
|
|
391
|
+
<!-- wp:query-pagination {"layout":{"type":"flex","justifyContent":"center"}} -->
|
|
392
|
+
<!-- wp:query-pagination-previous /-->
|
|
393
|
+
<!-- wp:query-pagination-numbers /-->
|
|
394
|
+
<!-- wp:query-pagination-next /-->
|
|
395
|
+
<!-- /wp:query-pagination -->
|
|
396
|
+
</div>
|
|
397
|
+
<!-- /wp:query -->
|
|
398
|
+
|
|
399
|
+
</main>
|
|
400
|
+
<!-- /wp:group -->
|
|
401
|
+
|
|
402
|
+
<!-- wp:template-part {"slug":"footer","area":"footer"} /-->
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
#### single-progetto.html — Case Study
|
|
406
|
+
|
|
407
|
+
```html
|
|
408
|
+
<!-- wp:template-part {"slug":"header","area":"header"} /-->
|
|
409
|
+
|
|
410
|
+
<!-- wp:group {"tagName":"main","layout":{"type":"constrained"}} -->
|
|
411
|
+
<main class="wp-block-group">
|
|
412
|
+
|
|
413
|
+
<!-- Header progetto -->
|
|
414
|
+
<!-- wp:group {"style":{"spacing":{"padding":{"top":"4rem","bottom":"2rem"}}}} -->
|
|
415
|
+
<div class="wp-block-group" style="padding-top:4rem;padding-bottom:2rem">
|
|
416
|
+
<!-- wp:post-terms {"term":"tipo_progetto","textColor":"muted","fontSize":"small"} /-->
|
|
417
|
+
<!-- wp:post-title {"level":1,"fontSize":"xx-large"} /-->
|
|
418
|
+
<!-- wp:post-excerpt {"fontSize":"large","textColor":"muted"} /-->
|
|
419
|
+
</div>
|
|
420
|
+
<!-- /wp:group -->
|
|
421
|
+
|
|
422
|
+
<!-- Immagine principale -->
|
|
423
|
+
<!-- wp:post-featured-image {"aspectRatio":"16/9","style":{"border":{"radius":"8px"}}} /-->
|
|
424
|
+
|
|
425
|
+
<!-- Meta progetto -->
|
|
426
|
+
<!-- wp:group {"backgroundColor":"surface","style":{"spacing":{"padding":{"top":"1.5rem","bottom":"1.5rem","left":"2rem","right":"2rem"},"margin":{"top":"2rem","bottom":"2rem"}},"border":{"radius":"8px"}},"layout":{"type":"flex","justifyContent":"space-between","flexWrap":"wrap"}} -->
|
|
427
|
+
<div class="wp-block-group has-surface-background-color has-background" style="border-radius:8px;padding:1.5rem 2rem;margin:2rem 0">
|
|
428
|
+
<!-- wp:group {"style":{"spacing":{"blockGap":"0.25rem"}}} -->
|
|
429
|
+
<div class="wp-block-group">
|
|
430
|
+
<!-- wp:paragraph {"textColor":"muted","fontSize":"small"} -->
|
|
431
|
+
<p class="has-muted-color has-text-color has-small-font-size"><strong>Tecnologie</strong></p>
|
|
432
|
+
<!-- /wp:paragraph -->
|
|
433
|
+
<!-- wp:post-terms {"term":"tecnologia","fontSize":"small"} /-->
|
|
434
|
+
</div>
|
|
435
|
+
<!-- /wp:group -->
|
|
436
|
+
</div>
|
|
437
|
+
<!-- /wp:group -->
|
|
438
|
+
|
|
439
|
+
<!-- Contenuto case study -->
|
|
440
|
+
<!-- wp:post-content {"layout":{"type":"constrained","contentSize":"720px"}} /-->
|
|
441
|
+
|
|
442
|
+
<!-- CTA contatto -->
|
|
443
|
+
<!-- wp:pattern {"slug":"portfolio-theme/contact-cta"} /-->
|
|
444
|
+
|
|
445
|
+
<!-- Navigazione prev/next -->
|
|
446
|
+
<!-- wp:group {"layout":{"type":"flex","justifyContent":"space-between"},"style":{"spacing":{"margin":{"top":"4rem"}}}} -->
|
|
447
|
+
<div class="wp-block-group" style="margin-top:4rem">
|
|
448
|
+
<!-- wp:post-navigation-link {"type":"previous","label":"Progetto precedente"} /-->
|
|
449
|
+
<!-- wp:post-navigation-link {"label":"Progetto successivo"} /-->
|
|
450
|
+
</div>
|
|
451
|
+
<!-- /wp:group -->
|
|
452
|
+
|
|
453
|
+
</main>
|
|
454
|
+
<!-- /wp:group -->
|
|
455
|
+
|
|
456
|
+
<!-- wp:template-part {"slug":"footer","area":"footer"} /-->
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
### 3.4 Patterns
|
|
460
|
+
|
|
461
|
+
#### Pattern: Contact CTA
|
|
462
|
+
|
|
463
|
+
```php
|
|
464
|
+
<?php
|
|
465
|
+
/**
|
|
466
|
+
* Title: Contact CTA
|
|
467
|
+
* Slug: portfolio-theme/contact-cta
|
|
468
|
+
* Categories: call-to-action, portfolio
|
|
469
|
+
*/
|
|
470
|
+
?>
|
|
471
|
+
<!-- wp:group {"backgroundColor":"surface","style":{"spacing":{"padding":{"top":"3rem","bottom":"3rem","left":"2rem","right":"2rem"},"margin":{"top":"4rem"}},"border":{"radius":"12px"}},"layout":{"type":"constrained","contentSize":"600px"}} -->
|
|
472
|
+
<div class="wp-block-group has-surface-background-color has-background" style="border-radius:12px;padding:3rem 2rem;margin-top:4rem">
|
|
473
|
+
<!-- wp:heading {"textAlign":"center","level":3} -->
|
|
474
|
+
<h3 class="wp-block-heading has-text-align-center">Hai un progetto simile?</h3>
|
|
475
|
+
<!-- /wp:heading -->
|
|
476
|
+
<!-- wp:paragraph {"align":"center","textColor":"muted"} -->
|
|
477
|
+
<p class="has-text-align-center has-muted-color has-text-color">Mi piacerebbe saperne di piu. Raccontami la tua idea e troviamo insieme la soluzione migliore.</p>
|
|
478
|
+
<!-- /wp:paragraph -->
|
|
479
|
+
<!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center"}} -->
|
|
480
|
+
<div class="wp-block-buttons">
|
|
481
|
+
<!-- wp:button {"backgroundColor":"accent","textColor":"base"} -->
|
|
482
|
+
<div class="wp-block-button"><a class="wp-block-button__link has-base-color has-accent-background-color has-text-color has-background" href="/contatti/">Parliamone</a></div>
|
|
483
|
+
<!-- /wp:button -->
|
|
484
|
+
</div>
|
|
485
|
+
<!-- /wp:buttons -->
|
|
486
|
+
</div>
|
|
487
|
+
<!-- /wp:group -->
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
#### Pattern: Tech Stack Badges
|
|
491
|
+
|
|
492
|
+
```php
|
|
493
|
+
<?php
|
|
494
|
+
/**
|
|
495
|
+
* Title: Tech Stack Badges
|
|
496
|
+
* Slug: portfolio-theme/tech-stack-badges
|
|
497
|
+
* Categories: portfolio
|
|
498
|
+
*/
|
|
499
|
+
?>
|
|
500
|
+
<!-- wp:group {"layout":{"type":"flex","flexWrap":"wrap"},"style":{"spacing":{"blockGap":"0.5rem"}}} -->
|
|
501
|
+
<div class="wp-block-group">
|
|
502
|
+
<!-- wp:group {"backgroundColor":"surface","style":{"spacing":{"padding":{"top":"0.35rem","bottom":"0.35rem","left":"0.75rem","right":"0.75rem"}},"border":{"radius":"100px"}}} -->
|
|
503
|
+
<div class="wp-block-group has-surface-background-color has-background" style="border-radius:100px;padding:0.35rem 0.75rem">
|
|
504
|
+
<!-- wp:paragraph {"fontSize":"small"} -->
|
|
505
|
+
<p class="has-small-font-size">React</p>
|
|
506
|
+
<!-- /wp:paragraph -->
|
|
507
|
+
</div>
|
|
508
|
+
<!-- /wp:group -->
|
|
509
|
+
<!-- wp:group {"backgroundColor":"surface","style":{"spacing":{"padding":{"top":"0.35rem","bottom":"0.35rem","left":"0.75rem","right":"0.75rem"}},"border":{"radius":"100px"}}} -->
|
|
510
|
+
<div class="wp-block-group has-surface-background-color has-background" style="border-radius:100px;padding:0.35rem 0.75rem">
|
|
511
|
+
<!-- wp:paragraph {"fontSize":"small"} -->
|
|
512
|
+
<p class="has-small-font-size">TypeScript</p>
|
|
513
|
+
<!-- /wp:paragraph -->
|
|
514
|
+
</div>
|
|
515
|
+
<!-- /wp:group -->
|
|
516
|
+
<!-- wp:group {"backgroundColor":"surface","style":{"spacing":{"padding":{"top":"0.35rem","bottom":"0.35rem","left":"0.75rem","right":"0.75rem"}},"border":{"radius":"100px"}}} -->
|
|
517
|
+
<div class="wp-block-group has-surface-background-color has-background" style="border-radius:100px;padding:0.35rem 0.75rem">
|
|
518
|
+
<!-- wp:paragraph {"fontSize":"small"} -->
|
|
519
|
+
<p class="has-small-font-size">Figma</p>
|
|
520
|
+
<!-- /wp:paragraph -->
|
|
521
|
+
</div>
|
|
522
|
+
<!-- /wp:group -->
|
|
523
|
+
</div>
|
|
524
|
+
<!-- /wp:group -->
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
### 3.5 Funzionalita Avanzate
|
|
528
|
+
|
|
529
|
+
#### Lightbox Nativo
|
|
530
|
+
|
|
531
|
+
WordPress 6.4+ include un lightbox nativo. Attivalo nel `theme.json`:
|
|
532
|
+
|
|
533
|
+
```json
|
|
534
|
+
{
|
|
535
|
+
"settings": {
|
|
536
|
+
"blocks": {
|
|
537
|
+
"core/image": {
|
|
538
|
+
"lightbox": {
|
|
539
|
+
"enabled": true,
|
|
540
|
+
"allowEditing": true
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
```
|
|
547
|
+
|
|
548
|
+
#### CSS Custom per Griglia
|
|
549
|
+
|
|
550
|
+
**assets/css/portfolio.css**
|
|
551
|
+
|
|
552
|
+
```css
|
|
553
|
+
/* Hover effect sulle immagini progetto */
|
|
554
|
+
.wp-block-query .wp-block-post-featured-image {
|
|
555
|
+
overflow: hidden;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.wp-block-query .wp-block-post-featured-image img {
|
|
559
|
+
transition: transform 0.4s ease, filter 0.4s ease;
|
|
560
|
+
aspect-ratio: 4/3;
|
|
561
|
+
object-fit: cover;
|
|
562
|
+
width: 100%;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
.wp-block-query .wp-block-post-featured-image:hover img {
|
|
566
|
+
transform: scale(1.03);
|
|
567
|
+
filter: brightness(0.95);
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
/* Grid responsive */
|
|
571
|
+
@media (max-width: 781px) {
|
|
572
|
+
.wp-block-post-template.is-layout-grid {
|
|
573
|
+
grid-template-columns: 1fr !important;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
Enqueue in `functions.php`:
|
|
579
|
+
|
|
580
|
+
```php
|
|
581
|
+
<?php
|
|
582
|
+
add_action('wp_enqueue_scripts', function() {
|
|
583
|
+
wp_enqueue_style(
|
|
584
|
+
'portfolio-custom',
|
|
585
|
+
get_theme_file_uri('assets/css/portfolio.css'),
|
|
586
|
+
[],
|
|
587
|
+
filemtime(get_theme_file_path('assets/css/portfolio.css'))
|
|
588
|
+
);
|
|
589
|
+
});
|
|
590
|
+
```
|
|
591
|
+
|
|
592
|
+
#### Performance Immagini
|
|
593
|
+
|
|
594
|
+
```php
|
|
595
|
+
<?php
|
|
596
|
+
// Dimensioni immagini ottimizzate per portfolio
|
|
597
|
+
add_action('after_setup_theme', function() {
|
|
598
|
+
add_image_size('project-grid', 800, 600, true);
|
|
599
|
+
add_image_size('project-hero', 1600, 900, true);
|
|
600
|
+
add_image_size('project-full', 1920, 0, false);
|
|
601
|
+
});
|
|
602
|
+
```
|
|
603
|
+
|
|
604
|
+
### 3.6 Workflow di Sviluppo
|
|
605
|
+
|
|
606
|
+
```bash
|
|
607
|
+
# Generare progetti di test
|
|
608
|
+
for i in $(seq 1 8); do
|
|
609
|
+
npx wp-env run cli wp post create \
|
|
610
|
+
--post_type=progetto \
|
|
611
|
+
--post_status=publish \
|
|
612
|
+
--post_title="Progetto Demo $i"
|
|
613
|
+
done
|
|
614
|
+
|
|
615
|
+
# Verificare CPT registrato
|
|
616
|
+
npx wp-env run cli wp post-type list --fields=name,label,public
|
|
617
|
+
|
|
618
|
+
# Verificare tassonomie
|
|
619
|
+
npx wp-env run cli wp taxonomy list --fields=name,label,object_type
|
|
620
|
+
|
|
621
|
+
# Rigenerare thumbnails
|
|
622
|
+
npx wp-env run cli wp media regenerate --yes
|
|
623
|
+
|
|
624
|
+
# Debug
|
|
625
|
+
npx wp-env run cli cat /var/www/html/wp-content/debug.log
|
|
626
|
+
npx wp-env logs wordpress --watch
|
|
627
|
+
```
|
|
628
|
+
|
|
629
|
+
---
|
|
630
|
+
|
|
631
|
+
## 4. Checklist di Lancio
|
|
632
|
+
|
|
633
|
+
### Contenuti
|
|
634
|
+
- [ ] Almeno 6-8 progetti pubblicati con immagini di alta qualita
|
|
635
|
+
- [ ] Ogni progetto ha immagine in evidenza (obbligatorio)
|
|
636
|
+
- [ ] Case study completi per almeno 3 progetti (sfida, soluzione, risultato)
|
|
637
|
+
- [ ] Pagina Chi Sono scritta come narrazione, non come CV
|
|
638
|
+
- [ ] Pagina Contatti con form funzionante
|
|
639
|
+
- [ ] Tassonomie assegnate a ogni progetto
|
|
640
|
+
- [ ] Excerpt compilato per ogni progetto
|
|
641
|
+
|
|
642
|
+
### Tecnico
|
|
643
|
+
- [ ] Theme responsive su mobile/tablet/desktop
|
|
644
|
+
- [ ] Custom Post Type registrato e funzionante
|
|
645
|
+
- [ ] Permalink funzionanti per `/progetti/`, `/tipo/`, `/tech/`
|
|
646
|
+
- [ ] Griglia responsive: 1 colonna mobile, 2 tablet, 3 desktop
|
|
647
|
+
- [ ] Lightbox funzionante su gallerie
|
|
648
|
+
- [ ] Navigazione prev/next tra progetti
|
|
649
|
+
- [ ] Menu di navigazione funzionante su mobile
|
|
650
|
+
- [ ] Template 404 personalizzato
|
|
651
|
+
- [ ] Favicon impostata
|
|
652
|
+
|
|
653
|
+
### Immagini e Performance
|
|
654
|
+
- [ ] Tutte le immagini in formato WebP
|
|
655
|
+
- [ ] Dimensioni appropriate (non 4000px per thumbnail)
|
|
656
|
+
- [ ] Lazy loading attivo
|
|
657
|
+
- [ ] Aspect ratio consistente nella griglia (4:3 o 16:9)
|
|
658
|
+
- [ ] Lighthouse Performance > 90 su mobile
|
|
659
|
+
- [ ] Nessun CLS al caricamento immagini
|
|
660
|
+
|
|
661
|
+
### SEO
|
|
662
|
+
- [ ] Plugin SEO configurato
|
|
663
|
+
- [ ] Meta description su ogni progetto
|
|
664
|
+
- [ ] Alt text su tutte le immagini
|
|
665
|
+
- [ ] Sitemap XML accessibile
|
|
666
|
+
- [ ] Open Graph tags per condivisione social
|
|
667
|
+
|
|
668
|
+
### Conversione
|
|
669
|
+
- [ ] CTA contatti visibile in ogni pagina progetto
|
|
670
|
+
- [ ] Form contatti testato e funzionante
|
|
671
|
+
- [ ] Link a progetto live funzionanti
|
|
672
|
+
- [ ] Link social/professionali nel footer o Chi Sono
|
|
673
|
+
|
|
674
|
+
### Sicurezza
|
|
675
|
+
- [ ] Password admin forte
|
|
676
|
+
- [ ] Plugin aggiornati
|
|
677
|
+
- [ ] SSL attivo (produzione)
|
|
678
|
+
- [ ] Backup automatico configurato
|
|
679
|
+
|
|
680
|
+
---
|
|
681
|
+
|
|
682
|
+
## 5. Riferimenti
|
|
683
|
+
|
|
684
|
+
### Skill del Plugin
|
|
685
|
+
|
|
686
|
+
| Skill | Quando usarla |
|
|
687
|
+
|-------|---------------|
|
|
688
|
+
| `wp-block-themes` | Sviluppo theme.json, templates, parts, patterns |
|
|
689
|
+
| `wp-local-env` | Setup e gestione ambiente wp-env |
|
|
690
|
+
| `wp-deploy` | Deploy in produzione |
|
|
691
|
+
| `wp-block-development` | Sviluppo blocchi custom (meta fields dinamici) |
|
|
692
|
+
| `wp-interactivity-api` | Filtri client-side senza reload |
|
|
693
|
+
| `wp-performance` | Ottimizzazione immagini e caching |
|
|
694
|
+
| `wp-plugin-development` | Plugin CPT e tassonomie |
|
|
695
|
+
| `wp-rest-api` | API per integrazioni headless |
|
|
696
|
+
| `wp-wpcli-and-ops` | Comandi WP-CLI per gestione contenuti |
|
|
697
|
+
| `wp-backup` | Backup e restore |
|
|
698
|
+
| `wp-content` | Gestione contenuti |
|
|
699
|
+
|
|
700
|
+
### Risorse Esterne
|
|
701
|
+
|
|
702
|
+
- [Block Theme Handbook](https://developer.wordpress.org/themes/block-themes/) — Documentazione ufficiale
|
|
703
|
+
- [theme.json Reference](https://developer.wordpress.org/themes/global-settings-and-styles/) — Schema completo
|
|
704
|
+
- [Custom Post Types](https://developer.wordpress.org/plugins/post-types/) — Registrazione CPT
|
|
705
|
+
- [Custom Taxonomies](https://developer.wordpress.org/plugins/taxonomies/) — Registrazione tassonomie
|
|
706
|
+
- [Template Hierarchy](https://developer.wordpress.org/themes/templates/template-hierarchy/) — Quale template viene usato
|
|
707
|
+
- [Interactivity API](https://developer.wordpress.org/block-editor/reference-guides/interactivity-api/) — Interattivita lato client
|
|
708
|
+
- [Lightbox in WordPress](https://make.wordpress.org/core/2023/08/01/lightbox-in-wordpress/) — Lightbox nativo
|
|
709
|
+
- [WP-CLI Commands](https://developer.wordpress.org/cli/commands/) — Tutti i comandi CLI
|
|
710
|
+
|
|
711
|
+
---
|
|
712
|
+
|
|
713
|
+
*Guida per il plugin [wordpress-manager](https://github.com/morrealev/wordpress-manager) v1.5.0+*
|