Viewing 2 replies - 1 through 2 (of 2 total)
  • I’m having the same issue. Would be nice to get some help 🙂

    I searched on Google, Tech forums, WordPress but could not find the solution.

    Here is a code that a lot of sites gave instructions to use:

    • Add this where you need the search form:

      <form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
      <div><input type="text" size="put_a_size_here" name="s" id="s" value="Write your search and hit Enter" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;"/>
      <input type="submit" id="searchsubmit" value="Search" class="btn" />
      </div>
      </form>
    • Add this in functions.php in your theme editor section:

      add_filter('wp_nav_menu_items','add_search_box', 10, 2);
      function add_search_box($items, $args) {
              ob_start();
              get_search_form();
              $searchform = ob_get_contents();
              ob_end_clean();
              $items .= '
      <li>' . $searchform . '</li>
      ';
          return $items;
      }

    This did not help me resolve the issue but might help someone get closer to solution 🙂

    Your help would be greatly appreciated!!!

    Check your plugins. Disable all and see if you make some progress. If so, enable one by one to find the culprit.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Links not working in search results’ is closed to new replies.