Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $search_query = get_search_query();
- $term = get_term_by( 'name', $search_query, 'category' );
- if ( !empty( $terms ) && !is_wp_error( $terms ) ){
- echo "<ul>";
- foreach ( $terms as $term ) {
- echo "<li>" . $term->name . "</li>";
- }
- echo "</ul>";
- }
- ;?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement