Forums

HELP: using the search widget gives me my 404 page now? (7 posts)

  1. kcjones76
    Member
    Posted 3 years ago #

    I'm not sure what is going on?
    I was initially working.
    I disabled all the plug-ins thinking there might have been a conflict... nada

    can someone take a peek?

    brand new to wordpress, so please bear with me.

    indesign1200.com

  2. omgitztrey
    Member
    Posted 3 years ago #

    Open your search.php or whatever and edit the syntax

    http://www.indesign1200.com/blog/%3C?s=test is the incorrect syntax

    It should be more in the lines of http://example.com/?s=zac+efron

  3. kcjones76
    Member
    Posted 3 years ago #

    it works fine with the default widget.php
    but when I use the the theme's file (r_sidebar.php, the return URL includes "%3C"
    if i delete those characters out of the URL I get the proper result. It's trying to create search result page that includes "%3C" which i believe is the "<"

    when searching for "indesign" this is what I get:

    default widget.php - search result URL
    http://www.indesign1200.com/blog/?s=indesign

    theme included r_sidebar.php - result URL
    http://www.indesign1200.com/blog/%3C?s=indesign

  4. iridiax
    Member
    Posted 3 years ago #

    There's probably a code error lurking in r_sidebar.php

  5. kcjones76
    Member
    Posted 3 years ago #

    well, that's what i'm trying to figure out...
    i'm not sure how to validate it though.

  6. iridiax
    Member
    Posted 3 years ago #

    It's most likely a php code error, which is not something that the validator is helpful with.

  7. iridiax
    Member
    Posted 3 years ago #

    Oh dear, your search form appears to be both malfunctioning and possibly insecure (PHP_SELF). Look in r_sidebar.php or searchform.php and replace this:

    <h2>Find It</h2>
    <div class="search">
    <form id="searchform" method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>/">
    <input type="text" name="s" id="s" value="search this site..."/>
    </form>
    </div>

    With this:

    <h2>Find It</h2>
    <div class="search">
    <form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
    <input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />
    </form>
    </div>

Topic Closed

This topic has been closed to new replies.

About this Topic