[resolved] Hide URL when searching so it doesn't show root folder (4 posts)

  1. Jack
    Posted 4 years ago #


    I recently remapped my website so that the wordpress is in a subdirectory of a new primary. All of the URLs are showing up correctly (new.com & new.com/blogentry) except when you do a search---it will show the entire URL for including the root folder: maindirectory.com/new.com/SearchResult

    Not sure why the url is masked everywhere else but the search, is there a way to hide it on the search as well?

  2. Jack
    Posted 4 years ago #


    I realize that the search code must just be drawing from the old site because if I change the URL to the new site with the same query at the end (the /?s=) it works.

    Does anyone know what file I need to change in order to have the search use the new domain? I would just create a redirect but that breaks the path of the pictures.


  3. Jack
    Posted 4 years ago #

    Maybe this?

    <form method="get" id="searchform" action="<?php echo $_SERVER['PHP_SELF']; ?>">
    <div class="searchform"><input type="text" value="<?php echo wp_specialchars($s, 1); ?>" name="s" id="s" size="20" style="margin-right:7px;" />
    <input type="submit" id="searchsubmit" value="Search" />
  4. Jack
    Posted 3 years ago #

    Welp, no one helped me with this. I ended up using a redirect.

Topic Closed

This topic has been closed to new replies.

About this Topic