2. [POST & CATEGORY] wp_get_post_categories() (nó lấy id category)(ok)
https://developer.wordpress.org/reference/functions/wp_get_post_categories/
wp_get_post_categories( int $post_id, array $args = array() )
Ví dụ 1: Đây là mặc định
C:\xampp\htdocs\wordpress\wp-content\themes\twentytwentyone\header.php
Ví dụ 2: Đây là có sử dụng tham số tham khảo thêm tham số trang chủ :)
C:\xampp\htdocs\wordpress\wp-content\themes\twentytwentyone\header.php
:: Chú ý: Tôi không thấy 'taxonomy' hoạt động :(
Previous1. [POST & CATEGORY] get_the_category() để xem bài viết thuộc category nào (lấy chi tiết category)NextHow can I convert the WordPress string meta_key value into simpler array ? string to array (Ok)
Last updated