Làm sao chúng ta có thể tạo thêm vùng Widget như trên ảnh sau:

1> Dùng plugin woosidebar tạo widget. Khi tạo ra được widget rồi thì dùng hook bỏ vào
2> Dùng plugin woosidebar hoặc code thêm vào
3> Dùng Code như hướng dẫn sau:
1 2 3 4 5 6 7 8 9 10 11 12 13 | //Author: fb Dương Mai Ngọc Lam // Khởi tạo sidebar if (function_exists('register_sidebar')){ register_sidebar(array( 'name'=> 'Sidebar Shoptop', 'id' => 'sidebar-shoptop', )); } // add sidebar vào hook function web2m_before_main_content() { if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebar-shoptop') ) : endif; } add_action('woocommerce_archive_description', 'web2m_before_main_content'); |
Nguồn: Tổng hợp từ Facebook

