Plugin not working at all (No Highlighted terms)
-
I have installed plugin and activated various settings. but its not showing anything on search page. Please check.
The page I need help with: [log in to see the link]
-
What does your theme search results template look like?
<?php get_header();
imic_sidebar_position_module(); ?>
<div class=”col-md-12 tealbg-title”><div class=”row”>
<?php echo do_shortcode( ‘[searchandfilter id=”95807″]’ ); ?>
</div></div>
<div class=”new-title-bar”>
<h1 ><?php printf(__(‘Search Results for : %s’, ‘framework’), get_search_query()); ?></h1>
<ul class=”trail-items” itemscope=”” itemtype=”https://schema.org/BreadcrumbList”>
<li itemprop=”itemListElement” itemscope=”” itemtype=”https://schema.org/ListItem” class=”trail-item trail-begin contents”>
” rel=”home” itemprop=”item”><span itemprop=”name”>Home</span>
<li itemprop=”itemListElement” itemscope=”” itemtype=”https://schema.org/ListItem” class=”trail-item trail-end contents” id=”myid”><span itemprop=”item”>
/archive”>Archive</span>
</div></div>
<div class=”container”><div class=”row”>
<?php global $wp_query;
$count = $wp_query->post_count;
$paged = !empty($wp_query->query_vars[‘paged’]) ? $wp_query->query_vars[‘paged’] : 1;
$prev_posts = ( $paged – 1 ) * $wp_query->query_vars[‘posts_per_page’];
$from = 1 + $prev_posts;
$to = count( $wp_query->posts ) + $prev_posts;
$of = $wp_query->found_posts;
echo ‘<div class=”total-res”>’;
echo ‘Results ‘;
printf( ‘%s to %s of %s’, $from, $to, $of );
echo ‘</div>’; ?>
<div class=”col-md-12 col-sm-12 posts-archive facetwp-template” id=”content-col”>
<?php
if (have_posts()) :
$post_type = get_post_type(get_the_ID());
if($post_type!=’event’) {
while (have_posts()):the_post();
echo'<article class=”post”>
<div class=”row”>’;
$class_child = 9;
if (has_post_thumbnail()):
$class_child = 5;
echo ‘<div class=”col-md-4 col-sm-4″>
‘;
the_post_thumbnail(‘600×400’, array(‘class’ => “img-thumbnail”));
echo’</div>’;
endif;
echo ‘<div class=”col-md-‘.$class_child.’ col-sm-‘.$class_child.'”>’;
echo ‘<h3>‘ . get_the_title() . ‘</h3>’;?>
<span class=”post-meta meta-data”><span class=”post-category-meta”><i class=”fa fa-calendar”></i>
<?php
$terms_issue = get_the_terms( get_the_ID(), ‘issue-category’ );
$terms_vol = get_the_terms( get_the_ID(), ‘volume’ );
$terms_author = get_the_terms( get_the_ID(), ‘authorarticles-category’ );
$term_list_type = get_the_terms( get_the_ID(), ‘type_articles’ );
$term_list_series = get_the_terms( get_the_ID(), ‘series’ );
$term_vals = get_term_meta($terms_issue[0]->term_id,’volume_article’);$terms_vol_new = get_term_by(‘id’, $term_vals[0], ‘volume’);
//echo’';print_r($terms_author);die; if(!empty($terms_vol)){ $vol_title = $terms_vol[0]->name; $vol_link = get_term_link($terms_vol[0]->slug, 'volume'); }elseif(!empty($term_vals)){ $vol_title = $terms_vol_new->name; $vol_link = get_term_link($terms_vol_new->slug, 'volume'); }else{ $vol_title = ''; $vol_link = ''; } if(!empty($terms_issue)){ $issue_title = $terms_issue[0]->name; $issue_link = get_term_link($terms_issue[0]->slug, 'issue-category'); }else{ $issue_title = ''; $issue_link = ''; } if(!empty($terms_author)){ $author_title = $terms_author[0]->name; $authors_link = get_term_link($terms_author[0]->slug, 'authorarticles-category'); //echo $author_title;die; }else{ $author_title = ''; $authors_link = ''; } echo '' . $issue_title . ''; //, Vol ' .$vol_title.' ?> </span> <span class="post-author-meta"><i class="fa fa-user"></i><?php esc_html_e(' By: ', 'framework'); ?> "><?php echo $author_title; ?>, in <?php if(!empty($term_list_type)){ ?>term_id);?>"><?php echo $term_list_type[0]->name;?><?php }if(!empty($term_list_series)){?>, term_id);?>"><?php echo $term_list_series[0]->name;?><?php } ?> </span> </span> <?php echo imic_excerpt(50); echo '<p>' . __('Continue reading', 'framework') . '<i class="fa fa-long-arrow-right"></i></p>'; ?> </div> <div class="right-div-line col-md-3 col-sm-12"> <?php $currentID = get_the_ID(); $terms_issue = get_the_terms( $currentID, 'issue-category' ); if(!empty($terms_issue)){ $issue_ebook_data = get_field('issue_ebook',$terms_issue[0]->taxonomy . '_' . $terms_issue[0]->term_id); $issue_ebook = $issue_ebook_data['url']; $wpcf_file_upload = get_field('file_upload',$terms_issue[0]->taxonomy . '_' . $terms_issue[0]->term_id); } else{ $issue_ebook_data = ''; $issue_ebook = ''; $wpcf_file_upload = ''; } if (isset($issue_ebook) && isset($wpcf_file_upload)) { $class="col-md-6 col-sm-6 col-xs-6 text-center"; } else{ $class="col-md-12 text-center"; } if ($issue_ebook) { echo '<div class="'.$class.'">'; echo '<p></P>'; echo '</div>'; } if ($wpcf_file_upload) { echo '<div class="'.$class.'">'; echo '<p></p>'; echo '</div>'; } ?> </div> </article> <?php endwhile; } else { echo '<div class="listing events-listing">'; echo '<section class="listing-cont">
- ';
$event_search = imic_recur_events('future','nos','','');
$array2 = array("" => get_the_ID());
$result = array_intersect($event_search, $array2);
ksort($result);
foreach($result as $key =>$value) {
$satime = get_post_meta($value,'imic_event_start_tm',true);
$satime = strtotime($satime);
$date_converted=date('Y-m-d',$key );
$custom_event_url = imic_query_arg($date_converted,$value);
echo '<li class="item event-item">
<div class="event-date"> <span class="date">' . date_i18n('d', $key) . '</span> <span class="month">' .imic_global_month_name($key). '</span> </div>
<div class="event-detail">
<h4>' . get_the_title($value).''.imicRecurrenceIcon($value).'</h4>';
$stime = '';
if ($satime != '') {
$stime = ' | ' . date(get_option('time_format'), $satime);
}
echo '<span class="event-dayntime meta-data">' . __(date('l', $key),'framework') . $stime . '</span> </div>
<div class="to-event-url">
<div>' . __('Details', 'framework') . '</div>
</div>
';
}
echo '
Please check above
The excerpt is printed out with
echo imic_excerpt(50);
. Try replacing this withthe_excerpt();
.added but no change, even title not showing background color yellow
Those are still not Relevanssi-generated excerpts. Can you please show me the template as it is now, and please post it to a Pastebin or something like that where the forum formatting doesn’t mess everything up.
If you use the Relevanssi admin search (Dashboard > Admin search), do you get the highlights there? If you do, your settings are correct and it’s only about the theme; if you don’t get highlights there, the Relevanssi excerpt and highlighting settings are not correct.
https://prnt.sc/wdfj02
looks like settings are correctYes, so please, show me the template in a Pastebin.
here is the code
Are you sure that’s the right template? The template file does not actually have code that matches what’s printed out on your search results page. Your results are wrapped in a
div
withcol-md-9
class, but nothing like that can be found in the template.yes this is the right template
$class_child = 9;
i am using this code for col-md-9In that case I don’t know, if the template is using
the_excerpt()
, that should print out the Relevanssi excerpts. You can try usingrelevanssi_the_excerpt()
instead to see if that works any better.<?php //echo imic_excerpt(50);
the_excerpt();its in the template
- The topic ‘Plugin not working at all (No Highlighted terms)’ is closed to new replies.