• Hello,

    I would like to know if there is a possibility of deleting the unwanted post tag from the search result and only keep proper posted text?

    It looks like a mess right now. Can we do that?

    Best wishes

Viewing 3 replies - 1 through 3 (of 3 total)
  • Some code like below work fine for you.

    while(have_posts()) :
      the_post();
      if(is_search()) :
        the_excerpt();
      else :
        /* do stuff */
      endif;
    endwhile;

    Or, Copy index.php and rename it search.php.
    Then, Change main loop to this:

    while(have_posts()) :
      the_post();
        the_excerpt();
      endif;
    endwhile;

    Thread Starter Lo?c Levêque

    (@luisobispo)

    Thank you very much kz,

    If I understand well what’s going on, the post contains flash videos, and for some reason the search results not only take the html text of the post, but the flash descriptions too.

    I had a look at the codes in the search.php, and it seems that it just looks like your loop:

    <div class=”archive_contents”>

    <h2>“><?php the_title(); ?></h2>

    <ul class=”archive_meta”>

    • <?php the_time(__(‘F jS, Y’,)) ?>
    • <?php _e(‘Posted in ‘,); ?><?php the_category(‘ . ‘); ?>
    • <?php if ($options[‘author’]) : ?>

    • <?php _e(‘By ‘,); ?><?php the_author_posts_link(); ?>
    • <?php endif; ?>

      <?php edit_post_link(__(‘[ EDIT ]’, ), ‘<li class=”post-edit”>’, ” ); ?>

      <p>“><?php the_excerpt_rss(); ?><span class=”read-more”><?php _e(‘[ READ MORE ]’, ); ?></span></p>

      </div>

      So, would that be <?php the_excerpt_rss(); ?> to change to <?php the_excerpt(); ?>

      ?

      Thank you again

    Thread Starter Lo?c Levêque

    (@luisobispo)

    In fact, what I do have as search result is:

    Search results for ‘ films ’ - 7 hit
    Home
    
        * January 28th, 2010
        * Posted in projects
    
    Get the Flash Player to see this player. var s0 = new SWFObject("/plugins/flash-video-player/mediaplayer/player.swf","n0","150","83","7"); s0.ad  [ READ MORE ]

    and so on…

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘post tags and flash contents showing with search results’ is closed to new replies.