Created
September 8, 2014 11:10
-
-
Save MhdAljuboori/2cfc83704cdb44401a11 to your computer and use it in GitHub Desktop.
WP-Theme Search Result page
This file contains 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 class="website-content"> | |
<h1><?php printf( __( 'Search Result For: %s', 'YOUR_THEME_NAME' ), '<span>"' . get_search_query() . '"</span>' ); ?></h1> | |
<div class="search-result"> | |
<?php if ( have_posts() ) : ?> | |
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> | |
<a href="<?php the_permalink(); ?>"><?php the_title() ?></a> | |
<?php endwhile; endif; ?> | |
<?php else: ?> | |
<h2> | |
<?php printf( __( 'No Results Found :(', 'YOUR_THEME_NAME' ) ) ?> | |
</h2> | |
<?php endif; ?> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment