Doug Stewart avatar Doug Stewart committed 8e4c87b

Merging in search.php improvements from 1.3-support branch.

Comments (0)

Files changed (2)

 ### VERSION HISTORY ###
 
 * Version 1.3.6
+	* **Features Added**
+		* Greater CSS flexibility (selectors aren't as specific, allowing for easier child theming)
 	* **Issues Fixed**
 		* BuddyPress "Load More" link in Activity streams actually, you know, *loads more*.
 		* bbPress support updated for all the proper bbP hooks, so certain plugins that weren't working before now **POOF** magically work again.
+		* Default search results if nothing is found were... *blank*. D'oh! Fixed.
 * Version 1.3.5
 	* **Issues Fixed**
 		* Fixed error where selecting "Display Text: no" in theme header options would still display the 50% opacity #titltedesc div.
 
 ### KNOWN ISSUES ###
 * Version 1.3.5
+	* <del>Search results with 0 results eventuate in empty search page</del>
 	* <del>bbPress support lags behind core bbPress Twenty Ten standards</del>
 	* <del>"Load More" link in BuddyPress Activity screen doesn't work</del>
 * Version 1.3.4
 <div id="allwrapper">
 <div id="wrapper">
 	<div id="lb-content">
-		<?php get_template_part('theloop' ); ?>
-	</div>
-</div>
+	<?php if ( have_posts() ) : ?>
+
+			<h1 class="searchresults"><?php printf( __( 'Search Results for: %s', 'lblgtextdomain' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
+
+		<?php /* Start the Loop */ ?>
+		<?php while ( have_posts() ) : the_post(); ?>
+			<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+				<?php lblg_before_post_title(); ?>
+				<?php if( !is_single() && !is_page() ) { ?><h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php echo strip_tags(get_the_title()) ?>"><?php the_title(); ?></a></h2>
+				<?php } else { ?><h1><?php the_title(); ?></h1><?php } ?>
+
+				<?php lblg_before_itemtext(); ?>
+				<div class="itemtext">
+					<?php 
+					if ( is_archive() or is_search() or is_tag() ) {
+						the_excerpt();
+					} else {
+						the_content('Continue reading'. " '" . the_title('', '', false) . "'");
+					}
+					wp_link_pages( array( 'before' => '<div class="post-pagination">Pages: ', 'after' => '</div>', 'next_or_number' => 'number')); 
+					?>
+				</div>
+				<?php lblg_after_itemtext(); ?>
+				<!--
+					<?php trackback_rdf(); ?>
+				-->
+			</div>
+
+
+		<?php endwhile;
+		get_template_part('navigation');
+		else : ?>
+		<h1 class="searchresults"><?php printf( __( 'Nothing matching "%s" found.', 'lblgtextdomain' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
+		<div class="itemtext">
+			<p><?php _e( 'Sorry, but nothing matched your search criteria. Please try again with some different keywords.', 'lblgtextdomain' ); ?></p>
+			<?php 
+			echo get_search_form();
+			?>
+		</div>
+
+	<?php endif; ?>
+	</div><!-- #lb-content -->
+</div><!-- #wrapper -->
 
 <?php get_sidebar(); ?>
 
-</div>
+</div><!-- #allwrapper -->
 
 <?php get_footer(); ?>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.