Viewing 11 posts - 1 through 11 (of 11 total)
  • Question

    #66931
    @georgeallen003

    Hello,

    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,
    George

    Answers

    #66935

    Anonymous
    @

    Hi @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 code if ( boss_get_option( 'boss_search_instead' ) && is_user_logged_in() ) { at line no.14 with this if ( boss_get_option( 'boss_search_instead' ) ) {

    Regards

    #67287
    @georgeallen003

    Hi @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?

    #67320

    Anonymous
    @

    Hi @georgeallen003, Copy the file header-mobile.php from your main theme.

    Create a folder template-parts in your child theme and put the file header-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

    #67327
    @georgeallen003

    Thanks.

    One point of clairification for others…it is:

    if ( onesocial_get_option( ‘onesocial_search_instead’ )

    rather than boss_get_option etc…

    #67338

    Anonymous
    @

    Hi @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 file header-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

    #67516
    @conscious-crafties

    Thank you so much @pallavi this is perfect! 😀

    #67528

    Anonymous
    @

    🙂

    #67545
    @jofeuerstein

    Just 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 🙂

    #67658

    Anonymous
    @

    Hi @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

    #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.

Viewing 11 posts - 1 through 11 (of 11 total)
  • The question ‘Search in mobile’ is closed to new replies.