BuddyBoss Home – Web › Support Forums › Solutions › Social MarketPlace › Search in mobile
Tagged: Mobile search, search, search bar
- This topic has 10 replies, 4 contibutors, and was last updated 8 years, 7 months ago by George.
Question
April 5, 2016 at 8:28 am #66931@georgeallen003Hello,
I noticed the search instead of logo option for mobiles only applies to users logged in. If a guest browses my site, they see the logo instead of the search box.
Can this be investigated please? It also happens on the demo, so I dont think it’s my setup.
Thanks,
GeorgeAnswers
April 5, 2016 at 8:36 am #66935@
AnonymousHi @georgeallen003, yes…the search bar is only for logged out users
If you want it for loggedout users too so you will have to do the changes in
boss-child/template-parts/header-mobile.php
change the codeif ( boss_get_option( 'boss_search_instead' ) && is_user_logged_in() ) {
at line no.14 with thisif ( boss_get_option( 'boss_search_instead' ) ) {
Regards
April 7, 2016 at 1:31 pm #67287@georgeallen003Hi @pallavi, thanks for the code, however I do not have that file or path in my child theme. It is present in the main theme files though.
Do I add it to the child theme? if so where?
April 7, 2016 at 10:51 pm #67320@
AnonymousHi @georgeallen003, Copy the file
header-mobile.php
from your main theme.Create a folder
template-parts
in your child theme and put the fileheader-mobile.php
inside that folder.So the path of that file in your child theme will be:
boss-child/template-parts/header-mobile.php
Regards
April 7, 2016 at 11:16 pm #67327@georgeallen003Thanks.
One point of clairification for others…it is:
if ( onesocial_get_option( ‘onesocial_search_instead’ )
rather than boss_get_option etc…
April 8, 2016 at 2:02 am #67338@
AnonymousHi @georgeallen003, I apologies for the misinterpretation..
Copy the file
header-mobile.php
from your main theme OneSocial.Create a folder
template-parts
in your child theme of OneSocial and put the fileheader-mobile.php
inside that folder.So the path of that file in your child theme will be:
onesocial-child/template-parts/header-mobile.php
And replace the code
if ( onesocial_get_option( 'onesocial_search_instead' ) && is_user_logged_in() ) {
with
if ( onesocial_get_option( 'onesocial_search_instead' ) ) {
at line no. 32
Regards
April 9, 2016 at 4:24 am #67516@conscious-craftiesThank you so much @pallavi this is perfect! 😀
April 9, 2016 at 5:49 am #67528@
Anonymous🙂
April 9, 2016 at 1:44 pm #67545@jofeuersteinJust out of curiosity: Is there any reason why the search box gets enabled for logged in users only by default? Before I override the template I’d like to understand if that has drawbacks other than the Site Name not appearing 🙂
April 10, 2016 at 11:13 pm #67658@
AnonymousHi @jofeuerstein, As most of our members create their site membership based or community site for members only and they want a proper security in their site. Search bar includes members lists, message boards, newsgroups, blogging, forums, custom post types and more…that’s why its enable for loggedin users only just to secure your site content.
Regards
April 12, 2016 at 2:45 pm #67847@georgeallen003@pallavi I follow your logic, however the search option is available on a desktop to logged out users.
I felt having the consistency of being able to use search for logged out users on both the desktop or mobile was the best for me, that’s why I implemented it.
The code is working great for my needs.
- The question ‘Search in mobile’ is closed to new replies.