WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] How do I change some details of the SEARCH WIDGET?

[Resolved] How do I change some details of the SEARCH WIDGET?

  • http://www.bewustzijnsvormen.nl, I work in a child theme of twentyten.

    Hi! My site’s almost finished, except for this two little things concerning the search widget:

    1 – I want to change the word ‘Search’ in the searchbutton into my native language. (I’ve managed it with the newsletter button, it now says ‘meld aan’ in stead of ‘Submit’, but since that was a plugin, and search is standard… I don’t have a clue.)I guess I should add php in the search.php file, but I’m not sure what to add.

    2 – with the search results (On this page for example: http://www.bewustzijnsvormen.nl/?s=workshops) I’d like to get rid of the little stripes and dot’s underneath the page titles in the search result. There was info on the posts and comments there. I managed to reduce it, but I can’t get rid of it…

    Hope someone here can help. Thanks in advance!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Michael

    @alchymyth

    Forum Moderator

    1.
    try and add a filter like this to functions.php of your theme:

    add_filter('get_search_form', 'new_search_button');
    function new_search_button($text) {
    $text = str_replace('value="Search"', 'value="Zoeken"', $text);
    return $text;
    }

    2.
    if you want to get rid of ‘entry-meta’ below the post title, try to use:
    .entry-meta { display:none; }
    or
    .entry-meta { visibility: hidden; }

    if you would like to do this only specifically on the search page, use:
    body.search .entry-meta { display: none; }

    Hi alchymyth,

    Thanks a lot!

    2. worked great! But not on all the stripes and dots. There still some there, underneath each ‘find’. I tryed to put {display:none;} behind everything starting with .entry, but that didn’t cure it, unfortunately. Do you have a tip for that also?

    And about 1. Somehow when I put a functions.php into my childtheme my whole site goes blank. What do you recommend?

    Thanks a lot!

    Michael

    @alchymyth

    Forum Moderator

    There still some there, underneath each ‘find’.

    i can’t find these (in IE7) – can you post a link to a page where these show?
    what browser are you using?

    Somehow when I put a functions.php into my childtheme my whole site goes blank.

    what is the content of that functions.php?

    try with the functions.php just containing the new filter, and php tags:

    <?php
    add_filter('get_search_form', 'new_search_button');
    function new_search_button($text) {
    $text = str_replace('value="Search"', 'value="Zoeken"', $text);
    return $text;
    }
    ?>

    make sure there is absolutely nothing before and after the php tags.

    if you simply copy the functions.php of the parent theme, this is likely to cause errors.

    Thanks so much, I indeed copied the parents functions.php So that’s solved now!

    Here’s a link to the page which still shows large white spaces with little dots between the search results. (I’d like to get those spaces smaller and get rid of the dots, which are remnants of info on comments):http://www.bewustzijnsvormen.nl/?s=workshop

    I use Safari and/or Firefox as browsers. (Firefox doesn’t show the dots, but still the spaces are very large).

    Thanks again!

    Michael

    @alchymyth

    Forum Moderator

    try:

    .entry-utility { display: none; }

    the large space is also caused by the large bottom margin in:

    .hentry {
    	margin: 0 0 48px 0;
    }

    O, you’re my hero! Thank you sooooo much!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] How do I change some details of the SEARCH WIDGET?’ is closed to new replies.
Skip to toolbar