wordpress能够用html5吗
wordpress是能够用html5的,能够为WordPress开启 HTML5 支持。WordPress 也能够经过正在 header.php 文件增加这段代码的办法完成。或许应用 functions.php 文件也能够:
找到以后主题对应的 functions.php 文件,并增加以下代码:
function add_ie_html5_shim () { echo ''; } add_action('wp_head', 'add_ie_html5_shim');
原理是经过 header.php 文件中的 wp_head() 函数强行拔出。
wordpress挪用html5文件
就WP外围来讲,只要要正在上面的HOOK
after_setup_theme
的函数内增加以下代码:
/* * Switch default core markup for search form, co妹妹ent form, and co妹妹ents * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'co妹妹ent-form', 'co妹妹ent-list', 'gallery', 'caption' ) ); 假如不找到挂到下面HOOK的函数,需求正在functions.php中增加: add_action( 'after_setup_theme', 'suoling_net_after_theme_setup' ); function suoling_net_after_theme_setup(){ /* * Switch default core markup for search form, co妹妹ent form, and co妹妹ents * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'co妹妹ent-form', 'co妹妹ent-list', 'gallery', 'caption' ) ); }
插件的HTML输入普通都是合乎HTML5规范的;别的,就是主题对HTML5的支持了,这个需求自行修正,不甚么便捷的办法。
更多WordPress技巧文章,请拜访WordPress教程栏目!
以上就是wordpress能够用html5吗的具体内容,更多请存眷资源魔其它相干文章!
标签: WordPress wordpress教程 wordpress自学 wordpress技术