WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Add wp search box in top bar

[Resolved] Add wp search box in top bar

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Bob
    Participant

    @rfgoetz

    What is your website URL? There is usually a java error that you can see from the developer tools.

    rcaba002
    Member

    @rcaba002

    Plugin Author Bob
    Participant

    @rfgoetz

    Odd beans… I don’t see any related errors. (You should fix the errors that are present though).

    Can you email me a SQL export of your TopBar? I’ll load it on my site to see what is wrong. My address is in the wp-topbar.php file.

    Thanks,

    Bob

    rcaba002
    Member

    @rcaba002

    I just sent it to you. Thanks!

    Plugin Author Bob
    Participant

    @rfgoetz

    It is because JavaScript has a hard time dealing with newline characters when using the prepend function used to cache the script.

    Try this instead of the PHP value you have:

    echo '<input type="text" name="s" id="s" placeholder="Search">';

    rcaba002
    Member

    @rcaba002

    Looks good. Thanks!

    But it’s not functional. Am I missing something? I’m not that advanced.

    Plugin Author Bob
    Participant

    @rfgoetz

    Hmm..

    Try this:

    ?><form method="get" id="searchform" action="<?php bloginfo('home'); ?>/"><div><input type=”text” value="<?php the_search_query(); ?>" name="s" id="s" /><input type="submit" id="searchsubmit" value="Search" /></div></form><br /><?php

    It has to be all one line — no newlines/enter characters.

    Bob

    Plugin Author Bob
    Participant

    @rfgoetz

    Closed – no response in a week.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] Add wp search box in top bar’ is closed to new replies.