WordPress.org

Ready to get started?Download WordPress

Forums

Relevanssi - A Better Search
[resolved] Relevanssi does not work for me :( (13 posts)

  1. mook73
    Member
    Posted 3 years ago #

    Hi,

    i have already installed and activated the plugin but it does not work. the search results still shows as what it has before. i understand i have to use the_excerpt() but i am not sure how to apply this part to my theme's search page. i tried but ended with unstoppable excerpts that goes on and on.

    i'm using woothemes' original premium news theme.

    hope someone can advise.

    the follow are the code in the Search Results php file:

    <?php get_header(); ?>
    
    		<div class="col1">
    
    		<?php if (have_posts()) : ?>
    
    		<div id="archivebox">
    
                	<h2><em><?php _e('Search Results','woothemes'); ?> |</em> "<?php printf(the_search_query());?>"</h2>        
    
    		</div><!--/archivebox-->
    
    			<?php while (have_posts()) : the_post(); ?>		
    
    				<div class="post-alt blog" id="post-<?php the_ID(); ?>">
    
    					<?php woo_image('height=57&width=100&class=th'); ?>
    
    					<?php if (function_exists('the_tags')) { ?><h2><?php the_tags('Tags: ', ', ', ''); ?></h2><?php } ?>
    					<h3><a>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
    					<p class="posted"><?php _e('Posted on','woothemes'); ?> <?php the_time('d F Y'); ?> <?php _e('by','woothemes'); ?> <?php the_author(); ?></p>
    
    					<div class="entry">
    						<?php the_content('<span class="continue">'.__('Continue Reading','woothemes').'</span>'); ?>
    					</div>
    
    					<p class="comments"><?php comments_popup_link(__('Comments (0)','woothemes'), __('Comments (1)','woothemes'), __('Comments (%)','woothemes')); ?></p>
    
    				</div><!--/post-->
    
    		<?php endwhile; ?>
    
    		<div class="navigation">
    			<div class="alignleft"><?php next_posts_link(__('« Previous Entries','woothemes')) ?></div>
    			<div class="alignright"><?php previous_posts_link(__('Next Entries »','woothemes')) ?></div>
    		</div>
    
    		<?php else : ?>
    
    		<div id="archivebox">
    
                	<h2><em><?php _e('Search Results','woothemes'); ?> |</em> <?php _e('None Found!','woothemes'); ?></h2>
                	<div class="archivefeed"><?php _e('Sorry! Your search yielded no results. Please search again.','woothemes'); ?></div>				
    
    		</div><!--/archivebox-->				
    
    	<?php endif; ?>							
    
    		</div><!--/col1-->
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    help!

    http://wordpress.org/extend/plugins/relevanssi/

  2. Mikko Saari
    Member
    Plugin Author

    Posted 3 years ago #

    So, what exactly happens if you replace the_content with the_excerpt? And what have you set for the excerpt length in Relevanssi settings?

  3. mook73
    Member
    Posted 3 years ago #

    i didn't take notice of the excerpt length. the excerpt did appear but it seems to go into continuous loop, repeating the same results to infinity, till i have to close the browser. any advise?

    i replaces the_post() with the_excerpt here:

    <?php while (have_posts()) : the_post(); ?>

    did i do wrongly? please advise. thank you!

  4. Mikko Saari
    Member
    Plugin Author

    Posted 3 years ago #

    Yes, that's wrong. You don't replace the_post(), you replace the_content().

  5. mook73
    Member
    Posted 3 years ago #

    hi Msaari,

    so is this the part that i should replace?

    <div class="entry">
    						<?php <strong>the_content</strong>('<span class="continue">'.__('Continue Reading','woothemes').'</span>'); ?>
    					</div>
  6. mook73
    Member
    Posted 3 years ago #

    yea. it work! thanks msaari!

  7. Mikko Saari
    Member
    Plugin Author

    Posted 3 years ago #

    Great, changing this to resolved now.

  8. mook73
    Member
    Posted 3 years ago #

    hi msaari,

    i have another question... the excerpt length is dependent on which factor? the excerpt box in wordpress?

  9. Mikko Saari
    Member
    Plugin Author

    Posted 3 years ago #

    The excerpt length setting in Relevanssi settings.

  10. mook73
    Member
    Posted 3 years ago #

    oops. i guess i have overlook that part. thanks msaari :)

  11. mook73
    Member
    Posted 3 years ago #

    thanks msaari again. i have one more question. under your description --> advance features in the wordpress.org plugin page, there is a feature "Google-style "Did you mean?" suggestions based on successful user searches."

    i'm not getting that. how do achieve the "did you mean?"?

    hope you can advise. thank you!

  12. Mikko Saari
    Member
    Plugin Author

    Posted 3 years ago #

    You added the code in the FAQ on your search results template? In addition to that, you need to have user search logging turned on. It won't work until you accumulate enough user searches as raw material.

  13. mook73
    Member
    Posted 3 years ago #

    hmmm, ok. i will have double check. thanks msaari!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags