WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Giving the Search Widget a title (4 posts)

  1. nintensity
    Member
    Posted 5 years ago #

    If you guys see the Widgets under the WP-Admin -> Design -> Widgets section, you can see that the widget "Search" is missing a title. I want a title so users know that that is a search textbox. Is there a way on doing this?

  2. Josh Leuze
    Member
    Posted 5 years ago #

    I believe you would have to edit your theme's sidebar to accomplish this, as the Search widget has no options.

  3. nintensity
    Member
    Posted 5 years ago #

    Ahh I'd manually have to do it.

    In my sidebar.php, i did this:

    <div id="sidebar">
    		<ul>
    		    <li class="widget-search">
                    <h2>Search</h2>
                        <?php include (TEMPLATEPATH . '/searchform.php'); ?>
                    </li>
    			<?php 	/* Widgetized sidebar */
    					if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
  4. asle
    Member
    Posted 5 years ago #

    Sorry for doubleposting but a similar problem I had was to get to the actual code for the search widget. I guess you could edit the same file. See my post below. To get a title to edit on the widget page I guess you would have to do something also with /wp-includes/widgets.php.

    This must be a well hidden secret. Nobody wants to answer, do this and that with CSS, bla,bla. Of course, donĀ“t touch it you just want to style it. Use CSS! But, just show me the code! I want to use a jQuery input box hint: http://remysharp.com/2007/01/25/jquery-tutorial-text-box-hints/
    So to really edit the search form structure you find it here:
    /wp-includes/general-template.php
    In WP 2.7 it is in function get_search_form() and edit line 113.
    Hope that saves some time :-)

    /asle

Topic Closed

This topic has been closed to new replies.

About this Topic