-
Author
-
September 17, 2017 at 01:00 #173925jamesbuddyrogersParticipant
Is there any way to remove the search tab from the main navigation?
Ideally I would like this search bar to search members. Is that possible? If not, I would just like to remove it is only reading pages for info, nothing from the forums or members profiles
let me know. cheers
September 17, 2017 at 16:18 #173938Kieran_SQModeratorHi,
To enable or disable the menu please go to WP Admin > SweetDate > Layout Settings > Scroll to: Ajax Search in menu. You can then toggle the menu search on or off.
With regards to extending this for post types other than users I will ask my colleague @Radu to take a look at this ticket for you.
Thanks,
Kieran.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
September 17, 2017 at 19:29 #173947jamesbuddyrogersParticipantOk thanks. For now I have turned it off. If @radu knows a way to make that search member names I will happily turn it back on.
cheers
September 19, 2017 at 16:06 #174108RaduModeratorHi,
So you want to have the search in the menu only for registered members ?
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionSeptember 20, 2017 at 15:34 #174209RaduModeratorJust add this code to functions.php
COPY CODEif ( ! function_exists( 'kleo_search_menu_item' ) ) { /** * Add search to menu * * @param string $items * @param oject $args * * @return string */ function kleo_search_menu_item( $items, $args ) { if ( $args->theme_location == 'primary' ) { ob_start(); get_template_part( 'page-parts/header-ajaxsearch' ); $form = ob_get_clean(); if(is_user_logged_in()) { $items .= '<li id="nav-menu-item-search" class="menu-item kleo-menu-item-search"><a class="search-trigger" href="#"><i class="icon icon-search"></i></a>' . $form . '</li>'; } } return $items; } }
NOTE : Child theme needs to be installed and activated.
The function needs to be pasted in wp-content/themes/sweetdate-child/functions.php
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionSeptember 21, 2017 at 19:22 #174321RaduModeratorHi,
Make sure to paste the code inside the PHP tag
https://pastebin.com/raw/MPkvAQcP and paste it again
It works just tried on my local install.
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionSeptember 22, 2017 at 15:55 #174393RaduModeratorHi,
Paste the code exact like on this link : https://pastebin.com/raw/83WML0X8
with no ?> php closing tag at the end.
Let me know
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionSeptember 25, 2017 at 16:18 #174728RaduModeratorVery odd, tried multiple times and it works for me…
Make sure the code to be there and If you have any cache plugin delete the cache or modified resources.
If still not works provide ftp + wp admin credentials to take a closer look in a private reply.
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionSeptember 27, 2017 at 16:49 #174964RaduModeratorDone,
It’s added
There was no snippet in your child theme,
something it’s wrong there you have sweetdate-child folder in sweetdate-child folder…. so it’s wrong, you will have to delete the sweetdate-child from wp-content/themes/sweetdate-child/
see screenshot to understand what I mean
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionSeptember 27, 2017 at 17:59 #174997jamesbuddyrogersParticipantI have removed the child folder inside the child folder. Must have copied by mistake.
However, the search bar at the top is NOT searching member names. Still displays no results when it works from the members page search tab.
Not sure how you are seeing this work as it won’t work for me on two differnt computers and my phone.
September 28, 2017 at 15:08 #175079RaduModeratorChecked again and it works as it should…. and the snippet it works perfectly tested from begining before providing to you.
empty all caches reboot router clear computer and browser cache
Cheers
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
You must be logged in to reply to this topic.