}
}
-function SearchFilter($query) {
- if(isset($_GET['searchType'])) {
- $searchType = $_GET['searchType'];
- if ($searchType == 'blog' && !is_admin()) {
- $query->set('post_type', 'post');
- }
- }
- return $query;
-}
-add_filter('pre_get_posts','SearchFilter');
-
/**
* glm_offcanvas_menu
*
function mytheme_search_loop() {
while ( have_posts() ) : the_post(); ?>
-
+
<div id="post-<?php the_ID() ?>" class="<?php thematic_post_class() ?>">
<?php thematic_postheader(); ?>
<div class="entry-content">
<?php thematic_content(); /* We will replace this next */ ?>
-
+
</div>
<?php thematic_postfooter(); ?>
</div><!-- .post -->
-
+
<?php endwhile;
}
add_action('thematic_searchloop', 'mytheme_search_loop');
-// End of the Contextual/Highlight Search functions
+// End of the Contextual/Highlight Search functions
?>
<div class="row">
<div id="blog-posts-over" class="small-12 medium-9 columns">
<?php if(have_posts()) : while(have_posts()): the_post();?>
+ <?php if (is_search() && (isset($_GET['searchType']) && $_GET['searchType'] == 'blog') && ($post->post_type=='page')) continue; ?>
<div class="row content search-result-container">
<div class="small-11 small-centered columns">
<article id="<?php the_ID()?>" <?php post_class()?>>
<h1 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h1>
<span class="meta date">Posted on <?php the_time('F jS, Y') ?></span>
</header>
-
-
+
+
<!-- Start of the Contextual/Highlight Search -->
<?php
// Configuration
</p>
<p>
<a href="<?php the_permalink() ?>" rel="bookmark">Read this entry</a>
- </p>
+ </p>
<!-- End of the Contextual/Highlight Search -->
-
+
<?php //echo (function_exists('the_advanced_excerpt')) ? the_advanced_excerpt(): the_excerpt(); ?>
<footer class="entry-meta small-12 medium-6 medium-push-3 center">
<?php
<?php } ?> <!-- end empty query check -->
</div>
</div>
- <?php get_footer(); ?>
\ No newline at end of file
+ <?php get_footer(); ?>