我從頭開始使用引導和網站使用wordpress,但現在我想使用wordpress和woocommerce電子商務網站,但我也想利用bootrap的命令的響應能力。我如何將bootstrap集成到我創建的wordpress主題中?如何使用wordpress和woocommerce的bootstrap?
回答
在你的主題/子主題functions.php文件,你應該排隊你的CSS和JavaScript文件。
例如:
function theme_enqueue_styles() {
wp_enqueue_style('bootstrap-theme-style', '/wp-content/themes/' . get_stylesheet() . '/assets/css/bootstrap.min.css');
wp_enqueue_script('bootstrap-min-script', '/wp-content/themes/' . get_stylesheet() . '/assets/js/bootstrap.min.js', array(), true);
}
add_action('wp_enqueue_scripts', 'theme_enqueue_styles');
只是引導的風格和JavaScript添加到主題標題,然後利用所描述的響應類: http://getbootstrap.com/css/#responsive-utilities
將JavaScript放入標題是一種不好的做法。另外,foor wordpress,我記得有'wp_'函數可以處理javascript。 –
如果它是您的自定義模板,這不是一個壞習慣。 –
接受的答案就是我的意思。 +1爲自定義事實 –
- 1. Woocommerce/WordPress的添加按鈕,我使用woocommerce一個WordPress主題
- 2. 如何使用str_replace,WordPress鉤子和WooCommerce功能
- 3. 如何在WordPress主題中使用BootStrap?
- 4. 如何使wordpress主題woocommerce兼容?
- 5. Woocommerce,wordpress
- 6. WordPress的woocommerce
- 7. 如何使用Bootstrap和Django?
- 8. Woocommerce(wordpress)和opencart集成
- 9. 在query_posts使用WooCommerce標題的WordPress
- 10. 如何重寫URL在WooCommerce/WordPress的
- 11. WordPress的WooCommerce YIT Metaboxes
- 12. 沒有WordPress的Woocommerce
- 13. WordPress的/ Woocommerce會話
- 14. Zoom Image Woocommerce - WordPress的
- 15. WordPress的/ WooCommerce註冊
- 16. Woocommerce中的WordPress do_shortcode
- 17. 如何使用domPDF和WordPress
- 18. Wordpress Multisite + Woocommerce
- 19. 在WordPress WooCommerce店
- 20. 如何在WordPress插件中使用WooCommerce函數?
- 21. 如何在WordPress WooCommerce結賬頁面上使用jQuery
- 22. WordPress和WooCommerce,太多的小部件
- 23. WordPress的菜單和WooCommerce類別
- 24. 如何保存添加元框woocommerce wordpress
- 25. WooCommerce如何刪除訂單操作(WordPress)
- 26. Wordpress - Woocommerce用戶Meta鍵
- 27. 如何創建使用BootStrap的WordPress主題?
- 28. 如何使用Bootstrap設置側邊欄中的Wordpress小部件?
- 29. 如何使用Ajax使用Flexslider和Wordpress?
- 30. 使Bootstrap風格重寫woocommerce-layout?
請縮小到具體的問題你的問題。你的問題太寬泛,無法回答。 – geeksal