Theme issue, only getting a single result, expect more
-
Hi Mikko, a new user, sorry but I’ve tried to read extensively. Using a theme called ‘ever-after’ which is a child of ‘forever’. Search seems to be coded in ‘forever’. Admin queries give me the expected results, 30 words, multiple hits. On install, only one result from the search box, and showed the entire post. Some research had me changing the ‘Ever-after’ content.php from:
<?php } else { ?>
<?php the_content( __( ‘Continue reading <span class=”meta-nav”>→</span>’, ‘ever-after’ ) ); ?>
<?php wp_link_pages( array( ‘before’ => ‘<div class=”page-links”>’ . __( ‘Pages:’, ‘ever-after’ ), ‘after’ => ‘</div>’ ) ); ?>
<?php }
——
to
<?php } else { ?>
<?php if (is_search()) {
the_excerpt();
} else {
the_content( __( ‘Continue reading <span class=”meta-nav”>→</span>’, ‘ever-after’ ) );
} ?>
<?php wp_link_pages( array( ‘before’ => ‘<div class=”page-links”>’ . __( ‘Pages:’, ‘ever-after’ ), ‘after’ => ‘</div>’ ) ); ?>
<?php } // if ( ” != get_the_post_thumbnail() ) ?>
</div><!– .entry-content –>
——-
From some earlier advice you gave. This then truncated the result to the expected 30 words.However, I only get a single (the first/highest) result whenever I search.
The active search.php (in ‘Forever’) is:
<?php
/**
* The template for displaying Search Results pages.
*
* @package Forever
* @since Forever 1.0
*/get_header(); ?>
<section id=”primary”>
<div id=”content” role=”main”><?php if ( have_posts() ) : ?>
<header class=”page-header”>
<h1 class=”page-title”><?php printf( __( ‘Search Results for: %s’, ‘forever’ ), ‘<span>’ . get_search_query() . ‘</span>’ ); ?></h1>
</header><?php forever_content_nav( ‘nav-above’ ); ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?><?php get_template_part( ‘content’, ‘search’ ); ?>
<?php endwhile; ?>
<?php forever_content_nav( ‘nav-below’ ); ?>
<?php else : ?>
<article id=”post-0″ class=”post no-results not-found”>
<header class=”entry-header”>
<h1 class=”entry-title”><?php _e( ‘Nothing Found’, ‘forever’ ); ?></h1>
</header><!– .entry-header –><div class=”entry-content”>
<p><?php _e( ‘Sorry, but nothing at all matched your search terms. Please try again with some different keywords.’, ‘forever’ ); ?></p>
<?php get_search_form(); ?>
</div><!– .entry-content –>
</article><!– #post-0 –><?php endif; ?>
</div><!– #content –>
</section><!– #primary –><?php get_sidebar(); ?>
<?php get_footer(); ?>
————Do you have any suggestions?
From the admin search, this looks to be a superb search plugin!
Cheers
Ian
eurmacs.comThe page I need help with: [log in to see the link]
- The topic ‘Theme issue, only getting a single result, expect more’ is closed to new replies.