WordPress.org

Forums

[resolved] [Theme: Twenty Twelve] Move search bar in navigation window (5 posts)

  1. Sam
    Member
    Posted 1 year ago #

    Hi!

    This is my website at the moment: http://www.getleanandrich.com

    I figured most things out by myself or just browing the forums. But I can't seem to move my search bar. I got it with this code, and I tried the widget search but couldn't move it plus this placed better. All I really want to do it move the search bar to the right end of the nav bar.

    <?php
    /**
     * Twenty Twelve Child
     */
    
    /**
     * Add a search bar to the navigation menu.
     *
     * @since Twenty Twelve 1.0
     */
    function menu_search($items){
        $search = '<li class="search">';
        $search .= '<form method="get" id="searchform" action="/">';
        $search .= '<label for="s" class="assistive-text">Search</label>';
        $search .= '<input type="text" class="field" name="s" id="s" placeholder="Search" />';
        $search .= '<input type="submit" class="submit" name="submit" id="searchsubmit" value="Search" />';
        $search .= '</form>';
        $search .= '</li>';
    
        return $items . $search;
    }
    add_filter('wp_nav_menu_items','menu_search');

    I tried with

    .searchform {
    left:20px;
    }

    But I'm new to coding and I really have no idea what kind of "name" the search box has. I'm new to website building in general and I'm using Chrome to fix this / find CSS.

    If you have another tip or another easier way to get a search box in the far right corner of the nav bar please feel free to share, I'm not stubborn :D

    Thanks!

    Sincerely,
    Sam

  2. Sam
    Member
    Posted 1 year ago #

    I found the answer myself despite not knowing any code. 2nd time I've figured it out before getting an answer here. Really disappointed as I was told this was a great forum for help. But all you get is "If you need help, pay for it" basically. This code was super-easy and would've taken any experienced person 30 seconds to compile.

    Here is the code in case anyone else tries to ask and no one answers:

    /* MOVE SEARCH BOX RIGHT
    ----------------------------------------------*/
    #searchform { /*Insert ID of what you want to move after the # */
    	position: relative;
    	left: 130px;
    }
  3. Andrew
    Nuh uh moderator
    Posted 1 year ago #

    I'm sorry but these forums just cannot do 1 hour deadlines (or any deadlines), and so I again encourage you to seek professional support: http://jobs.wordpress.net/

  4. Sam
    Member
    Posted 1 year ago #

    Had threads for two days without a single reply, also easy coding. And again with the professional support lol. I got it done without paying a dime, and it just reinforces my thoughts on people being greedy assholes in general.

  5. Andrew
    Nuh uh moderator
    Posted 1 year ago #

    We really are doing the best we can, but there are simply too many people asking for support than there are giving it.

    WordPress.org is all about not paying a dime, but it is clear that you're not satisfied with the support from WordPress.org and so you might be better seeking support elsewhere, paid support as suggested.

    WordPress.org support levels aren't going to get any better unless more people help out.

    Like any open-source project you should be ready to help improve the service you criticize. In your free time when ever you get a chance can you have a browse through the forums, which ever you're more comfortable with, and try resolving some threads? You might come across some threads that will take 30 seconds to resolve :)

Topic Closed

This topic has been closed to new replies.

About this Topic