ive just noticed, i put ‘charset’ instead of url in the bloginfo tag
Which makes me a complete moron. Sorry everyone, moron passing through.
Anonymous User
(@anonymized-3085)
standard search form:
$form = '<form role="search" method="get" id="searchform" action="' . home_url( '/' ) . '" >
<div><label class="screen-reader-text" for="s">' . __('Search for:') . '</label>
<input type="text" value="' . get_search_query() . '" name="s" id="s" />
<input type="submit" id="searchsubmit" value="'. esc_attr__('Search') .'" />
</div>
</form>';
I think you have a mistake or 2 in your coding…
I’ve got it working now, I was just being a tit.
Only problem I now have is that when I click ‘next page’ on my search results it gives me a strange url
Can anyone have a look for me? Search ‘test’
http://subverb.net/blog/moog/
This is what I have as my search.php loop
<div class="post_section grid_15">
<?php global $wp_query;
$p = array('post_type' => array('event','post'));
$post = array_merge($wp_query->query_vars, $p);
query_posts($post); ?>
<?php if (have_posts()) : ?>
<h2>Search Results</h2>
<br /><br />
<?php while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<div class="post_header">
<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
<p> Posted on <?php the_time('F jS, Y') ?> by <?php the_author() ?></p>
</div><!--End of Post Header-->
<div class="post_footer"><p><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p></div><!--End of Post Footer-->
</div>
<?php endwhile; ?>
<?php if (next_posts_link() || previous_posts_link()): ?>
<?php next_posts_link('« Older Entries') ?> | <?php previous_posts_link('Newer Entries »') ?>
<?php endif ?>
<?php else : ?>
<h2>Not Found</h2>
<p>Sorry, but you are looking for something that isn't here.</p>
<?php get_search_form(); ?>
<?php endif; ?>
</div>
Anonymous User
(@anonymized-3085)
somehow you are adding in /blog/moog where it isn’t needed, this may be from your search form, as navigating to page 2 and back to the first page fixes it.
What do I correct on my search form? Its what I have above except the action is bloginfo(‘url’)
Ah, thanks. Works great now