Created
June 12, 2012 16:52
-
-
Save takatoshi/2918673 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div id="content"> | |
| <?php if (is_search()) : ?> | |
| <?php $allsearch =& new WP_Query("s=$s&showposts=-1"); ?> | |
| <?php $key = wp_specialchars($s, 1); ?> | |
| <?php $count = $allsearch->post_count; ?> | |
| <?php $search_result = '<p id="search_result">『<span class="search">'.$key.'</span>』で検索した結果、<span class="search">'.$count.'</span>件がヒットしました。</p>'; ?> | |
| <?php endif; ?> | |
| <?php if (have_posts()) : ?> | |
| <?php if (is_search()) : ?> | |
| <?php echo $search_result; ?> | |
| <?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment