It’s not working.
I’ve done everything according to the instructions. But when I enter the search term it shows an 404 error.
this is where I’ve placed the code in the search.php
<?php printf( __( ' Search Results found for' , 'radix') . '<span class="text-muted"> %s</span>', get_search_query() ); ?></h2>
</header>
<!--volgende regel is ter ondersteuning van de plugin Curated Search-->
<?php do_action('cs_search_after_title'); ?>
<?php /* Start the Loop */ ?>
What could be causing this?
Kind regards!
]]>Hi
This plugin seems to be the ideal solution for the type of site I have which involves customized results for search.
But when I add a new post in ‘Special searches’ of curated search, it does only shows ‘Ooops… No results found for’ in search results.
Even the preview posts still shows “Ooops… Error 404
We are sorry, but the page you are looking for does not exist.”
I think the problem could be because I don’t know exactly where to enter the php code in my search.php file.
I am not using the default wordpress theme as in the video tutorial. Though I am by no means a php expert, i can place the code if directed where to.
I am actually using BeTheme, latest version.
Please kindly advice what to do or take a look at my search.php below and let me know where to add the line of code.
Thanks
<?php
/**
* The search template file.
*
* @package Betheme
* @author Muffin group
* @link https://muffingroup.com
*/
get_header();
$translate['search-title'] = mfn_opts_get('translate') ? mfn_opts_get('translate-search-title','Ooops...') : __('Ooops...','betheme');
$translate['search-subtitle'] = mfn_opts_get('translate') ? mfn_opts_get('translate-search-subtitle','No results found for:') : __('No results found for:','betheme');
$translate['published'] = mfn_opts_get('translate') ? mfn_opts_get('translate-published','Published by') : __('Published by','betheme');
$translate['at'] = mfn_opts_get('translate') ? mfn_opts_get('translate-at','at') : __('at','betheme');
$translate['readmore'] = mfn_opts_get('translate') ? mfn_opts_get('translate-readmore','Read more') : __('Read more','betheme');
?>
<div id="Content">
<div class="content_wrapper clearfix">
<!-- .sections_group -->
<div class="sections_group" style="width:100% !important;">
<div class="section">
<div class="section_wrapper clearfix">
<?php if( have_posts() ): ?>
<div class="column one column_blog">
<div class="blog_wrapper isotope_wrapper">
<div class="posts_group classic">
<?php
while ( have_posts() ):
the_post();
?>
<div id="post-<?php the_ID(); ?>" <?php post_class( array('post-item', 'clearfix', 'no-img') ); ?>>
<div class="post-desc-wrapper">
<div class="post-desc">
<?php if( mfn_opts_get( 'blog-meta' ) ): ?>
<div class="post-meta clearfix">
<div class="author-date">
<span class="author"><span><?php echo $translate['published']; ?> </span><i class="icon-user"></i> <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php echo get_the_author_meta( 'display_name' ); ?></a></span>
<span class="date"><span><?php echo $translate['at']; ?> </span><i class="icon-clock"></i> <?php echo get_the_date(); ?></span>
</div>
</div>
<?php endif; ?>
<div class="post-title">
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
</div>
<div class="post-excerpt">
<?php the_excerpt(); ?>
</div>
<div class="post-footer">
<div class="post-links">
<i class="icon-doc-text"></i> <a href="<?php the_permalink(); ?>" class="post-more"><?php echo $translate['readmore']; ?></a>
</div>
</div>
</div>
</div>
</div>
<?php
endwhile;
?>
</div>
<?php
// pagination
if(function_exists( 'mfn_pagination' )):
echo mfn_pagination();
else:
?>
<div class="nav-next"><?php next_posts_link(__('← Older Entries', 'betheme')) ?></div>
<div class="nav-previous"><?php previous_posts_link(__('Newer Entries →', 'betheme')) ?></div>
<?php
endif;
?>
</div>
</div>
<?php else: ?>
<div class="column one search-not-found">
<div class="snf-pic">
<i class="themecolor <?php mfn_opts_show( 'error404-icon', 'icon-traffic-cone' ); ?>"></i>
</div>
<div class="snf-desc">
<h2><?php echo $translate['search-title']; ?></h2>
<h4><?php echo $translate['search-subtitle'] .' '. esc_html( $_GET['s'] ); ?></h4>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>
]]>
You know there is a bug in your redirect plugin? When I search in Products on the Admin side, it redirects to the Website front end!
]]>For many searches I get duplicate results.
Also number of results are not limited anymore (I use 5 posts per page).
Hope you updated sood.
I want a search term to skip search results and go to an internal landing page.
Trying to use the destination URL within the curated searches special searches but cannot figure out the format in which it needs to be entered. I have tried all variations of the internal URL I have but when someone searches my term from the front end it still goes to the search landing page and displays 74 pages of results I don’t want shown.
When someone searches webadvisor:
/?s=webadvisor
I want it to go to:
/contact
but I have tried putting all these url types into the destination URL with no luck: