admin管理员组文章数量:1319479
I've programmed a theme before three years and I want to update it with Bootstrap. I need the input groups, modal windows and some other features.
Now I have implemented it and it works! But one thing I dont understand: If I want to use the bootstrap classes like form-control for input fields I don't know how can I set the class to all the available input fields. I tried it for the search box widget with this code and it works:
function search_form($html) {
$html = str_replace('id="s"', 'id="s" class="form-control" required', $html);
return $html;
}
add_filter('get_search_form', 'search_form');
Now the search field have the class form-control and the CSS style from Bootstrap. But that can't a good solution, I think. How can I set the class to all input fields like "input=text, textarea, checkboxes...."?
Or is there a way to assign the Bootstrap classes to the available wordpress classes in CSS? I mean: If the input field has the class "wordpress-input", so I can say in CSS "form-control extends wordpress-input"?
I hope you understand me. Sorry for my bad english I'm from Germany :)
Thanks in advance!
本文标签: cssBootstrap in theme
版权声明:本文标题:css - Bootstrap in theme 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742056790a2418345.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论