-
Author
-
August 9, 2016 at 23:05 #131854arbolifeParticipant
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
August 10, 2016 at 19:16 #131944RaduModeratorHi,
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 solutionAugust 10, 2016 at 23:18 #131966arbolifeParticipantHi 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,
MarcAugust 11, 2016 at 16:32 #132045RaduModeratorHi,
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 solutionAugust 11, 2016 at 19:06 #132088RaduModeratorNo problem
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionOctober 1, 2016 at 23:41 #137819greenscotlandParticipantHi,
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,
AdamOctober 3, 2016 at 18:40 #137977RaduModeratorWhere 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 solutionOctober 3, 2016 at 22:10 #138013greenscotlandParticipantHi 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,
AdamAttachments:
You must be logged in to view attached files.October 4, 2016 at 17:02 #138122RaduModeratorAdd 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 solutionOctober 4, 2016 at 22:59 #138229greenscotlandParticipantPerfect, 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, AdamOctober 5, 2016 at 19:26 #138329RaduModeratorI 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 solutionOctober 5, 2016 at 21:58 #138376greenscotlandParticipantHi Radu,
You will see the search box in the socket at the bottom of my website: https://greenscotland.org/
Thanks,
AdamOctober 6, 2016 at 16:48 #138437RaduModeratorUse 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
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionOctober 6, 2016 at 17:30 #138442andriusParticipantHi Radu,
does this AJAX search form work with other custom post types than built in KLEO cpt?
October 6, 2016 at 19:07 #138463RaduModeratorYes
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 solutionOctober 6, 2016 at 22:04 #138484greenscotlandParticipantThanks 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, AdamOctober 7, 2016 at 17:52 #138608RaduModeratorWhere 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 solutionOctober 7, 2016 at 22:39 #138649greenscotlandParticipantPlease 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,
AdamAttachments:
You must be logged in to view attached files.October 10, 2016 at 16:21 #138847RaduModeratorAdd also this CSS
COPY CODE.kleo-search-form #searchform .input-lg { opacity:1 !important;}
Cheers
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionOctober 10, 2016 at 23:05 #138957greenscotlandParticipantThanks 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
October 10, 2016 at 23:15 #138958greenscotlandParticipantCan you tell me also how to reduce the width of the search box. Thanks very much
October 11, 2016 at 18:10 #139086RaduModeratorReplace 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 solutionOctober 11, 2016 at 21:33 #139173greenscotlandParticipantThanks 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
October 12, 2016 at 18:27 #139298RaduModeratorAdd 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 solutionOctober 12, 2016 at 22:13 #139344greenscotlandParticipantIdeal! Thanks for all your help Radu. Much appreciated, Adam
October 13, 2016 at 18:14 #139456RaduModeratorYou’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 -
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.