Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Take a look at your search results template, maybe there’s separate code for pages and posts?

    Thread Starter iena69

    (@iena69)

    sorry for the question but… what should be the name of the file to check? searchform.php? I’m using a modified kippis theme

    Thread Starter iena69

    (@iena69)

    this is my search.php

    <?php
    
    get_header();
    
    if (!$kippis_is_smartphone) get_sidebar('left');
    
    ?>
    
          <div id="content">
    
            <article>
    
              <div class="article">
    
                <div id="search-results">
    
                  <?php if (have_posts()) : ?>
    
                    <header class="page-header">
    
                      <h1 class="page-title"><?php printf(__('Search Results for: %s','kippis'), '<span>' . get_search_query() . '</span>' ); ?></h1>
    
                    </header>
    
                    <?php kippis_content_nav('nav-above'); ?>
    
                    <?php while (have_posts()) : the_post(); ?>
    
                      <div class="search-result">
    
                        <header class="entry-header">
    
                          <h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'kippis' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
    
                          <div class="entry-meta">
    
                            <?php kippis_posted_on(); ?>
    
                          </div><!-- .entry-meta -->
    
                        </header><!-- .entry-header -->
    
                        <?php if (has_post_thumbnail()) : ?>
    
                          <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" ><?php the_post_thumbnail(); ?></a>
    
                        <?php endif; ?>
    
                        <?php the_excerpt(); ?>
    
                      </div><!-- search-result -->
    
                    <?php endwhile; ?>
    
                    <?php kippis_content_nav( 'nav-below' ); ?>
    
                  <?php else : ?>
    
                    <div id="post-0" class="article post no-results not-found">
    
                      <header class="entry-header">
    
                        <h1 class="entry-title"><?php _e('Nothing Found','kippis'); ?></h1>
    
                      </header><!-- .entry-header -->
    
                      <div class="entry-content">
    
                        <p><?php _e('Sorry, but nothing matched your search criteria. Please try again with some different keywords.','kippis'); ?></p>
    
                        <?php get_search_form(); ?>
    
                      </div><!-- .entry-content -->
    
                    </div><!-- #post-0 .article -->
    
                  <?php endif; ?>
    
                </div><!-- .search-results -->
    
              </div><!-- article -->
    
            </article>
    
          </div><!-- content -->
    
    <?php
    
    if ($kippis_is_smartphone) get_sidebar('left');
    
    get_sidebar('right');
    
    get_footer();

    Plugin Author Mikko Saari

    (@msaari)

    Nothing in your search results template. If I search for “outlaws” on your site, I see two results, both showing excerpts.

    Thread Starter iena69

    (@iena69)

    yes… but the first one is an excerpt that doesn’t contain the word “outlaws”, it’s only the beginning of the page that contain the word

    Plugin Author Mikko Saari

    (@msaari)

    Ah, that’s a different issue altogether. It’s a bug that will be fixed in the next version. If you want to fix it now, find the two calls to usort() in lib/excerpts-highlights.php and change them to uksort().

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘No excerpt in pages’ is closed to new replies.