TWV's blog, rebuilt to look — and read — like a credible B2B source
Across several rounds we fixed the layout bugs, redesigned the article header into a premium overlay-hero, then fact-checked every data-heavy post against primary sources — correcting real errors while refusing to cite blogs or invent numbers. Outcome: tradewithviet.com's blog now looks premium, reads consistently, and stands on government/official-body figures.
6-layer thinking chainChuỗi tư duy 6 tầng
"bug, text too close to margin; blog: 2 titles; the format of all blog is not consistent; not premium ... should have call out text box; quote mark ... scan and audit. not only content but also layout, formatting"
- Theme is Hello Elementor; WP-Optimize prunes a mu-plugin's per-page inline <style> on pages lacking the target class, and a hidden minify cache bundles each page's CSS and hides edits for hours.
- 52 published posts span 3 generations: 21 premium
.twv-articleposts, ~30 Elementor-built infographics/templates, plus buggy duplicates. - The article drafts are AI-written; a real share of their specific figures were unsourced or wrong.
- Hard rule: never fabricate a source or a statistic; live edits must match the exact stored HTML.
- Patch CSS only — fast, but leaves legacy posts unstyled and figures unverified.
- Deep-migrate all 52 posts — uniform, but would destroy the bespoke infographic designs.
- Stage a redesign, then targeted fact-check (chosen) — most work, highest credibility gain.
- Blanket-soften every unverified number — safe-looking, but guts correct figures and the confident voice.
Why the CSS lives in the Customizer — and the cache that hid it
A post is generated as plain branded HTML, but its look comes from two places, and a caching layer sits between the database and the reader. Getting styling to actually appear meant understanding all three.
| Technical termThuật ngữ kỹ thuật | Plain nameTên dễ hiểu | RoleVai trò |
|---|---|---|
twv-article-style.php | Masthead (title + hero) | PHP mu-plugin: suppresses the theme title on posts and prepends a full-bleed hero banner with the title/meta overlaid. PHP only — no CSS. |
custom_css post 6737 | All article styling | The Customizer stylesheet, served whole on every page. Article/masthead/TOC CSS lives here because WP-Optimize prunes a mu-plugin's inline style per-page. |
WP-Optimize minify cache | The cache that hid edits | Bundles each page's CSS/JS into a versioned file separate from the page cache; does not invalidate on a CSS edit. Must be purged + reset explicitly. |
enrich_post.php | Surgical content editor | Applies factual corrections + inline citations to live post HTML, with URL-dedup and title-linked sources, without re-rendering (so figures survive). |
Read it in 30 seconds: the pipeline writes class-based HTML; the look is injected at render by the mu-plugin (title+hero) and the Customizer (everything else); the reader gets it through WP-Optimize's caches.
What ran, in order
Layered decision cardsCác quyết định theo tầng
Artifact mapBản đồ tệp tạo ra
| PathĐường dẫn | WhatLà gì | Who reads itAi dùng |
|---|---|---|
wp-content/mu-plugins/twv-article-style.php | Title suppression + overlay-hero masthead + dup-title filter + floating-TOC script | Every single post (server-side) |
Customizer custom_css (post 6737) | All article / masthead / hero / TOC / callout / pull-quote / Resources-hero CSS (Petrol & Gold) | Served whole on every page |
scripts/twv-automation/render_guides.py | Pipeline: pull-quote support, no in-body hero/read-time, title-linked Sources format | New post rendering |
scripts/twv-automation/enrich_post.php | Surgical corrections + citations injector (URL-dedup, title-link, per-post backup) | Live content fact-fixes |
docs/wordpress-safety-rules.md | Added: minify-cache purge, Customizer write-guard, live-content phrase-matching | Anyone editing live WP |
~/.claude/skills/twv-blog/references/00-production-system.md | Overlay-hero standard + figure-accuracy / citation discipline | Future blog production |
.claude project memory (MEMORY.md + 2 entries) | Minify cache + fact-check discipline surfaced in every future session | Future sessions |
- Footer mobile horizontal-scroll is a pre-existing, site-wide footer issue (Elementor contact icon-boxes not stacking) — article-scoped overflow was fixed; the footer template fix is offered as a separate task.
- blogviz.py still generates hero/figure PNGs in the older navy/gold/teal palette — a known follow-up to align imagery to Petrol & Gold.
- A few figures that no authority publishes (and a couple genuinely ambiguous ones) were softened or attributed rather than asserted — replace with exact numbers if you have first-party data.