• chris-stegner

    (@chris-stegner)


    I need to edit the Search box on this page:

    https://75.77.18.202/~jpfloor/

    I want to put the text “Search For:” in front of the input box and button. I also need to change the style of the text. I think I have that part figured out within the style sheet. My problem is that I’m not sure which file this is in to move it around. I assume it’s in one of the php files, not sure which one.

    Any help would be highly appreciated.

Viewing 1 replies (of 1 total)
  • huggie

    (@huggie)

    It’s your theme that’s putting it that way around.

    The page that contains that search form (and shouldn’t be edited as it’s part of the core) is /wp-includes/general-template.php and the PHP looks like this:

    $form = '<form role="search" method="get" id="searchform" action="' . get_option('home') . '/" >
    	<div><label class="screen-reader-text" for="s">' . __('Search for:') . '</label>
    	<input type="text" value="' . esc_attr(apply_filters('the_search_query', get_search_query())) . '" name="s" id="s" />
    	<input type="submit" id="searchsubmit" value="'. esc_attr__('Search') .'" />
    	</div>
    	</form>';

    As you can see from this, if it was displayed without a stylesheet, the label would be in front of the input field. You’ll need to look to your CSS for this I think.

Viewing 1 replies (of 1 total)
  • The topic ‘Search Location in Code’ is closed to new replies.