소스 검색

Enable HTML5 Suport

Add HTML5 searchform.php and enable HTML5 theme support for the comment
form filds (email and URL), optimizing mobile keyboard experience.
AdsonCicilioti 11 년 전
부모
커밋
43f4767793
2개의 변경된 파일14개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      functions.php
  2. 8 0
      searchform.php

+ 6 - 1
functions.php

@@ -244,6 +244,11 @@ function bones_fonts() {
 
 add_action('wp_enqueue_scripts', 'bones_fonts');
 
-
+// Enable support for HTML5 markup.
+	add_theme_support( 'html5', array(
+		'comment-list',
+		'search-form',
+		'comment-form'
+	) );
 
 /* DON'T DELETE THIS CLOSING TAG */ ?>

+ 8 - 0
searchform.php

@@ -0,0 +1,8 @@
+<form role="search" method="get" id="searchform" class="searchform" action="<?php echo home_url( '/' ); ?>">
+    <div>
+        <label for="s" class="screen-reader-text"><?php _e('Search for:','bonestheme'); ?></label>
+        <input type="search" id="s" name="s" value="" />
+
+        <button type="submit" id="searchsubmit" ><?php _e('Search','bonestheme'); ?></button>
+    </div>
+</form>