• Resolved IlanK

    (@ilank)


    Hi there,

    First of all, your plugin is amazing. I love it.

    I am having a bit of a search issue though. When a search is done on my website (www.ironwhisk.com), the dates above the post titles are links. Not only are they links, but they’re links to the post directly above (so not even the same post). Any ideas on how to fix this?

    Also, is there anyway to have text in the search box before the user searches that disappears on click?

    Thanks so much!

    Ilan

    http://wordpress.org/plugins/relevanssi/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Relevanssi doesn’t really have anything to do with the presentation of the search results. That’s up to your theme and the search results template. Edit that to fix any issues with how the search looks like.

    As for your second question, here’s a very modern way to do that: http://kamikazemusic.com/quick-tips/jquery-html5-placeholder-fix/

    Here’s more: http://stackoverflow.com/questions/2984311/delete-default-value-of-an-input-text-on-click

    Thread Starter IlanK

    (@ilank)

    Thank you for your reply.

    So I take it I should add something like placeholder=”What’s your programming question ? be specific.” into the HTML code for the search field.

    Would you mind pointing me to where I could find this code in WordPress?

    Thanks,

    Ilan

    Thread Starter IlanK

    (@ilank)

    I tried adding this code to my functions.php

    function html5_search_form( $form ) {
         $form = '<section class="widget-container widget_search"><form role="search" method="get" id="searchform" action="' . home_url( '/' ) . '" >
        <label class="screen-reader-text" for="s">' . __('',  'domain') . '</label>
    <div class="search-input">     <input type="search" value="' . get_search_query() . '" name="s" id="s" placeholder="e.g. chocolate" /> </div>
         <input type="submit" id="searchsubmit" value="'. esc_attr__('Search', 'IronWhisk') .'" />
         </form></section>';
         return $form;
    }
    
     add_filter( 'get_search_form', 'html5_search_form' );

    but the text doesn’t disappear on click

    Plugin Author Mikko Saari

    (@msaari)

    Do notice that this is a very new feature, and doesn’t work on many browsers yet. The Stackoverflow thread had more backwards-compatible solutions.

    Thread Starter IlanK

    (@ilank)

    Alright, well I guess it doesn’t really matter that much.
    You should consider adding it, and perhaps predictive search, to the next update. 🙂

    Thread Starter IlanK

    (@ilank)

    *resolved*

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Links’ is closed to new replies.