WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Category base causes search to fail (3 posts)

  1. cheaper
    Member
    Posted 6 years ago #

    Hello

    I have set up a category base of holidays however, if you are in the category of holidays/travel-news then try and do a blog search the search fails with no results.

    This does no happen in tags/ of anywhere else is there a fix perhaps.

    The main site is at / but the files are at /cheaper-holidays/

    In the header for the search we have

    <form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <p> <input name="submit" type="image" src="<?php bloginfo('stylesheet_directory');?>/images/search_button.gif" alt="search" /> </p> <p><input name="s" type="text" class="src_field" value="<?php the_search_query(); ?>" /></p> </form>

    Thanks for reading

    Kevin

  2. Kafkaesqui

    Posted 6 years ago #

    Try altering the action attribute in your search <form> to:

    action="<?php bloginfo('home'); ?>">
  3. cheaper
    Member
    Posted 6 years ago #

    Thank you for your time and effort worked a treat

    Kevin

Topic Closed

This topic has been closed to new replies.

About this Topic