author

Result box inserts into loop and repeats for each occurrence

4 months ago | judyhz (Member) | |

I donated! Not only did the kittens cry, my dog wouldn't stop barking...

I'm sure this is something I've done incorrectly...I'm trying to show some posts above my page content, and the Local Search Results box inserts itself into the loop and so shows up before each occurrence of the search term. Thanks for any help...

Here's my code:

'<div id="main">

<?php $temp_query = $wp_query; ?>

<?php query_posts('cat=3&showposts=1'); ?>

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

<h1>Announcements</h1>

<p><?php the_content(); ?></p>

<?php endwhile; ?>
<?php $wp_query = $temp_query; ?>

<?php while (have_posts()) : the_post(); ?>
<h1 style="border-bottom: none;">About the Page </h1>

<p><?php the_content(); ?></p>
<?php endwhile; ?>
</div>

<?php $wp_query = $temp_query; ?>'

Read responses...

Responses

  1. John:

    Posted 1 month ago by Key Master

    Hi Judy, sorry for missing this message but are you still stuck?

Reply

You must log in to post.

Home | Software | Terms & Conditions | Sitemap | John Godley © 2008