Comments Breno started the conversationFebruary 8, 2017 at 2:18amHello,Is there a way to remove porfolio items from search results?I tried to remove the following code from search.php, but it did not work:<?php } else if( get_post_type($post->ID) == 'portfolio' ){ ?> <article class="result"> <div class="inner-wrap"> <span class="bottom-line"></span> <?php if(has_post_thumbnail( $post->ID )) { echo '<a href="'.get_permalink().'">'.get_the_post_thumbnail($post->ID, 'full', array('title' => '')).'</a>'; } ?> <h2 class="title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <span><?php echo __('Portfolio Item', NECTAR_THEME_NAME); ?></span></h2> </div> </article><!--/search-result--> 8,998Tahir repliedFebruary 8, 2017 at 4:44pmHey Again,Please have a look at : limit the Search Function to Just Display Products Only..Bes.t ThemeNectar Support Team Sign in to reply ...
Hello,
Is there a way to remove porfolio items from search results?
I tried to remove the following code from search.php, but it did not work:
<?php }
else if( get_post_type($post->ID) == 'portfolio' ){ ?>
<article class="result">
<div class="inner-wrap">
<span class="bottom-line"></span>
<?php if(has_post_thumbnail( $post->ID )) {
echo '<a href="'.get_permalink().'">'.get_the_post_thumbnail($post->ID, 'full', array('title' => '')).'</a>';
} ?>
<h2 class="title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <span><?php echo __('Portfolio Item', NECTAR_THEME_NAME); ?></span></h2>
</div>
</article><!--/search-result-->
Hey Again,
Please have a look at : limit the Search Function to Just Display Products Only..
Bes.t
ThemeNectar Support Team