Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter alexgraham

    (@alexgraham)

    Hi Mikko. You’re absolutely right, the plugin is working correctly. I didn’t know about the admin search function, but just tested it and the results are correct.

    The problem is with the front-end search template not being setup right.

    Thanks for your help,
    Alex

    Hampus I think you need to differentiate the_content() and the_excerpt(), I have no idea why you would want to use the_excerpt() on a single.php page, there is better ways to paginate or limit output for those pages. If you want to control the excerpt you can hardcode it by adding the following in your functions.php (example will display 20 words only when the_excerpt() is used):

    function new_excerpt_length($length) {
    	return 20;
    }
    add_filter('excerpt_length', 'new_excerpt_length');
    Thread Starter alexgraham

    (@alexgraham)

    fixed with:

    <div id="container">
    		<div id="content">
    			<?php
    				$cat = single_cat_title("", false);
    				$cat_id = get_cat_ID($cat)
    			?>
    			<div id="latest-products">
    				<h2><?php echo $cat; ?></h2>
    				<div class="product-container">
    				<?php
    				$temp = $wp_query;
    				$wp_query= null;
    				$wp_query = new WP_Query();
    				$wp_query->query('showposts=20'.'&paged='.$paged.'&cat='.$cat_id);
    				while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
    					<div class="product">
    						<!-- displays product stuff -->
    					</div><!-- .product -->
    				<?php endwhile;	?>
    
    				<!-- Paging stuff -->
    				</div>
    			</div>
    
    		</div><!-- #content .hfeed -->
    	</div><!-- #container -->

    your links are pointing to the wrong url, think you’re using the wrong wp function. Try using something like this:
    <a class="blog-link" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title() ?></a>

    Alex

Viewing 4 replies - 1 through 4 (of 4 total)