admin管理员组文章数量:1405190
I tried a lot with using bootstrap to show the WordPress theme options page to appear in grid view. As we do col-lg4 and so...
I added add_editor_style(); for bootstrap, nothing happened.
The only table works there. I just want to design the theme options page to look good for the admin by using the full space available as well as responsive.
If I want to use bootstrap, how to do that or any other better way for the same.
I tried a lot with using bootstrap to show the WordPress theme options page to appear in grid view. As we do col-lg4 and so...
I added add_editor_style(); for bootstrap, nothing happened.
The only table works there. I just want to design the theme options page to look good for the admin by using the full space available as well as responsive.
If I want to use bootstrap, how to do that or any other better way for the same.
Share Improve this question edited Jan 2, 2020 at 14:08 fuxia♦ 107k39 gold badges255 silver badges459 bronze badges asked Jan 2, 2020 at 14:00 webfuelcodewebfuelcode 212 bronze badges1 Answer
Reset to default 0If you're building a custom menu page for your theme options, then you can first use add_menu_page()
to register the menu page. Then to use custom styles and scripts on that page, you need to enqueue them on admin_enqueue_scripts
action.
Something along these lines,
function my_enqueue_admin_assets() {
$screen = get_current_screen();
// only enqueue assets on the custom page
if ( empty( $screen->id ) || 'your_custom_menu_page_slug' !== $screen->id ) {
return;
}
// wp_enqueue_style( $handle, $src = false, $deps = array(), $ver = false, $media = 'all' );
// wp_enqueue_script( $handle, $src = false, $deps = array(), $ver = false, $in_footer = false );
}
add_action( 'admin_enqueue_scripts', 'my_enqueue_admin_assets' );
So enqueue the Bootstrap styles with the above code and then use the appropriate css classes on the markup you write for the add_menu_page()
callback.
本文标签: twitter bootstrapHow to make wordpress theme option page in columns
版权声明:本文标题:twitter bootstrap - How to make wordpress theme option page in columns? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744865194a2629304.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论