This topic has 26 replies, 4 voices, and was last updated 8 years by Radu.

  • Author
  • #131854
     arbolife
    Participant

    Hi,

    I love the ajax search function that comes with Kleo and I have 2 questions:

    1. Can it also search inside forum posts? I noticed only titles seem to be indexed.

    2. How come when I hit “enter” I don’t see the same results? I’m missing users and bbpress all together. What would it take to have a result “page” with the content provided in the ajax dropdown?

    Thanks,

    Marc

    #131944
     Radu
    Moderator

    Hi,

    Hi,

    You can have a ajax search wherever you want using this shortcode in text widget and the search form will be rendered there.

    Mentioning the context you can select in what type you search

    [kleo_search_form]
    [kleo_search_form context="members,groups,post,page,forum,product,portfolio"]

    for search in forums you can use [kleo_search_form context="forum"] using default shortcode [kleo_search_form] will search in all available types.

    You can add this on any page or sidebar that you need

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #131966
     arbolife
    Participant

    Hi Radu,

    That’s great, the Ajax works really nicely, that’s my point. Is there a way of seing the same result as in the Ajax but on a page when hitting ENTER? Right now, when I hit ENTER, it forwards the search to the default /?s=… and there isn’t the same content as on the Ajax result page.

    Thanks,
    Marc

    #132045
     Radu
    Moderator

    Hi,

    This is a normal behaviour, this is not the ajax search works, in future we will improve this feature.

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #132084
     arbolife
    Participant

    Hi, thanks. That would be great.

    Cheers,
    Marc

    #132088
     Radu
    Moderator

    No problem

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #137819
     greenscotland
    Participant

    Hi,
    Can someone help me to style this search form. I have added it to my site footer using [kleo_search_form] but it is bigger than I would like and I would also like to be able to add the text “Search” inside it.
    Thanks,
    Adam

    #137977
     Radu
    Moderator

    Where inside ? provide screenshot that points out exact the location.

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #138013
     greenscotland
    Participant

    Hi Radu,
    Please see attached screenshot. I would like to put the “Search website:” text inside the white search box as shown. I would like this text to disappear once someone starts typing their search.
    I would also like to know how to style this box so that it is smaller.
    Thanks,
    Adam

    Attachments:
    You must be logged in to view attached files.
    #138122
     Radu
    Moderator

    Add placeholder attribute

    [kleo_search_form placeholder="Search.."]

    cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #138229
     greenscotland
    Participant

    Perfect, thanks Radu. Could you also let me know how to style this box so that it is a bit smaller. And why does it turn a darker colour when you click somewhere else on the page?
    Regards, Adam

    #138329
     Radu
    Moderator

    I need to see this live to can give you a css that makes the search box smaller

    Cheers
    r.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #138376
     greenscotland
    Participant

    Hi Radu,
    You will see the search box in the socket at the bottom of my website: https://greenscotland.org/
    Thanks,
    Adam

    #138437
     Radu
    Moderator

    Use this selector

    COPY CODE
    
    #socket .kleo-search-form #searchform .input-lg {
        height: 40px !important;
        text-align: center;
    }
    

    Css will be added to wp-admin -> theme options -> general settings -> quick css

    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #138442
     andrius
    Participant

    Hi Radu,

    does this AJAX search form work with other custom post types than built in KLEO cpt?

    #138463
     Radu
    Moderator

    Yes

    You can use the shortcode like this

    [kleo_search_form context="gd_place"] instead of gd_place add your cpt slug and if you want to search thru all remove context attribute

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #138484
     greenscotland
    Participant

    Thanks Radu,
    Can you show me also how to reduce the width of the search box. And why does the search box turn a darker colour when you click somewhere else on the page?
    Regards, Adam

    #138608
     Radu
    Moderator

    Where i can see live the behaviour that you explain ?

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #138649
     greenscotland
    Participant

    Please see screenshot 1 which shows how the search box looks normally (white). Just click anywhere else on the site apart from in the search box and you will see that the search box turns a darker colour (see screenshot 2). I do not want this to happen, I would like the search box to stay white always.
    This is the code I am using in the socket:
    <p style=”text-align: center;”>[kleo_search_form placeholder="Search this website..."]</p>
    Thanks,
    Adam

    Attachments:
    You must be logged in to view attached files.
    #138847
     Radu
    Moderator

    Add also this CSS

    COPY CODE
    
    .kleo-search-form #searchform .input-lg { opacity:1 !important;}
    

    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #138957
     greenscotland
    Participant

    Thanks Radu. Sorry could you please confirm that the css below is the correct one to add as I wasn’t sure how to add the last bit to the previous bits:

    #socket .kleo-search-form #searchform .input-lg { opacity:1 !important;} {
    height: 40px !important;
    }

    Cheers, Adam

    #138958
     greenscotland
    Participant

    Can you tell me also how to reduce the width of the search box. Thanks very much

    #139086
     Radu
    Moderator

    Replace the code that i have provided to you with this

    COPY CODE
    
    #socket form#searchform, #socket .kleo-search-form #searchform .input-lg {
        height: 40px !important;
        max-width: 350px;
        margin: 0 auto;
    }
    
    #socket .kleo-search-form #searchform .input-group-btn { top:8px; }
    

    Replace max-width: 350px; with your desired max width value

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #139173
     greenscotland
    Participant

    Thanks Radu, I have added the code to my quick css and the size is now perfect but the search box still turns a darker colour when you click somewhere else on the page. Please could you take another look and advise how to stop this happening. Many thanks again, Adam

    #139298
     Radu
    Moderator

    Add also this css

    COPY CODE
    
    #socket form#searchform, #socket .kleo-search-form #searchform .input-lg {
        opacity: 1 !important;
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #139344
     greenscotland
    Participant

    Ideal! Thanks for all your help Radu. Much appreciated, Adam

    #139456
     Radu
    Moderator

    You’re welcome

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 27 posts - 1 through 27 (of 27 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?