WordPress
29 bài viết trong chuyên mục WordPress.
register_post_type WordPress — 25 tham số + show_in_rest
register_post_type 25 tham số: visibility, permalinks, permissions, UI. show_in_rest cho Block Editor. Capability mapping. Flush rewrite an toàn.
Đọc bài →
register_taxonomy WordPress — hierarchical vs flat + term meta
register_taxonomy 20 tham số, hierarchical vs non-hierarchical, attach multiple CPT, term meta API, REST endpoint, migration script.
Đọc bài →
Hook, action và filter WordPress — concept fundamental
Action vs Filter khác biệt, 5 hook lifecycle quan trọng, priority + accepted_args, remove_action, custom hook trong plugin.
Đọc bài →
Walker_Nav_Menu tùy biến — build mega menu WordPress
Custom Walker_Nav_Menu cho mega menu, icon SVG, badge từ Carbon Fields. 4 method bắt buộc + cache transient.
Đọc bài →
Plugin boilerplate WordPress — WPPB vs Underscores vs custom
So sánh 3 boilerplate WP, PSR-4 autoload, OOP vs procedural, modular feature toggle, PHPUnit + WP_Mock, GitHub Actions deploy.
Đọc bài →
Child theme WordPress — classic vs block theme child
Child theme là gì, 4 use case, cấu trúc tối thiểu, enqueue parent + child đúng thứ tự, classic vs block theme.
Đọc bài →
Tạo plugin WordPress từ đầu — 7 bước build chuẩn
Hướng dẫn build plugin WordPress từ đầu: file structure, header 12 field, activation/deactivation/uninstall hook, settings page, WPCS.
Đọc bài →
Translate theme WordPress — i18n + .pot/.po/.mo workflow
Hướng dẫn i18n theme WP: text domain, 8 hàm i18n, generate .pot bằng WP-CLI/Loco, plural Vietnamese, deploy .mo.
Đọc bài →
WooCommerce theme support — 3 cấp độ + override template
add_theme_support woocommerce 3 cấp độ, override template, hook before/after_main_content, custom loop, WC 9.x block-based.
Đọc bài →
Enqueue script style WordPress đúng cách — 4 hook + conditional load
wp_enqueue_script vs wp_register_script, 4 hook theo context, conditional load, defer/async, dequeue plugin asset.
Đọc bài →