WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Moving search form (8 posts)

  1. DanielFHC
    Member
    Posted 3 years ago #

    I'm using a theme called "Rusalka". My site is http://www.fhcoutdoors.com

    I have a coded search form, and am trying to move it from the sidebar up to the navbar right above it's current location. (Straight up).

    I am confused, I have a searchform.php, sidebar.php, and also the style.css that I need to edit.

    I would greatly appreciate any help, because I don't know where to start. Let me know if I need to post any of the code for clarification.

  2. Samuel B
    moderator
    Posted 3 years ago #

    open theme's sidebar.php
    find this bit near top

    <div id="topsearch" >
        		<?php get_search_form(); ?>
        	</div>

    remove it
    save file

    open theme's header.php
    find

    function menu_2_default()
                            {
                                ?>
                                <ul id="nav">

    add this to it so it is like so

    function menu_2_default()
                            {
                                ?><?php get_search_form(); ?>
                                <ul id="nav">

    save file

    always back up 1st

    I must tell you that this theme has obfuscated code in the header.php and in the functions.php that protects the footer links
    if you mess with them at all the theme will die and put an error message on your site disabling it

  3. DanielFHC
    Member
    Posted 3 years ago #

    Thanks, that certainly moved the form, but it's stretching across the entire width of the menu? Where would I clarify the width?

  4. Samuel B
    moderator
    Posted 3 years ago #

    you can style the box in the theme's style.css
    under search section, add something like
    width: 247px;
    float: right;

    look for
    #search

  5. DanielFHC
    Member
    Posted 3 years ago #

    Hmm, I can't believe this. It looks as if the "search button" is what is causing my menu to be blank. Normally, there are category links on the left hand side, but they're not showing.

    I'll keep tinkering with it...and thanks so much for your help Sam. You'be been a huge help!

  6. DanielFHC
    Member
    Posted 3 years ago #

    * Update

    Been changing css one at a time, and if I make the search bar skinnier (20 px high instead of 26px), my links start to show again. In other words, my search form is pushing my links down in the nav bar?

    Here is the css code for the search bar. Just noticed, it's still under the "sidebar" section in css. /* SIDEBAR(S) */
    Would appreciate help!

    http://wordpress.pastebin.com/ftu3yEZs

  7. DanielFHC
    Member
    Posted 3 years ago #

    *Going to bed frustrated!

    For some reason, I have to edit the #search to 0px, meaning the form itself pushes my links down and out of the navbar.

    Right now as it stands with the form at 0px, everything is in it's right place. I just don't have the white form background???

    This is beyond my knowledge!
    http://www.fhcoutdoors.com/

  8. DanielFHC
    Member
    Posted 3 years ago #

    After looking into my theme farther, I decided to get rid of it altogether. Quality themes are a dime a dozen, so I've switched.

    Thanks for all of the help, I appreciate it.

Topic Closed

This topic has been closed to new replies.

About this Topic