我可以通过替换
在chrome developer tool元素中用搜索图标替换搜索文本
<input type="submit" value="search">
&#13;
<button type="submit" id="searchsubmit" />
<span class="icon"><i class="fa fa-search"></i></>
</button>
&#13;
这是主题searchform.php
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
?><form role="search" method="get" class="pojo-form form-search" action="<?php echo home_url( '/' ); ?>">
<label for="s">
<span class="sr-only"><?php _e( 'Search for:', 'pojo' ); ?></span>
</label>
<input type="search" title="<?php _e( 'Search', 'pojo' ); ?>" name="s" value="<?php echo ( isset( $_GET['s'] ) ) ? $_GET['s'] : ''; ?>" placeholder="<?php _e( 'Search...', 'pojo' ); ?>" class="field search-field">
<button value="<?php _e( 'Search', 'pojo' ); ?>" class="search-submit button" type="submit"><?php _e( 'Search', 'pojo' ); ?></button>
</form>
&#13;
我的问题是 如何修改searchform.php以获取搜索图标 https://krush.co.il/
答案 0 :(得分:0)
<button class="search-submit button" type="submit"><span class="icon"><i class="fa fa-search"></i></span></button>
您不需要同时拥有按钮的值和按钮标记的内部html。您只想用图标html更改搜索文本。