Search Bar

This topic contains 5 replies, has 2 voices, and was last updated by  Paolo 8 years, 10 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #60344

    scottpinhorne
    Expired Member
    Post count: 8

    Hi

    Is it possible with the GEO1280 theme to change the search bar on the homepage:

    http://www.liverylist.co.uk/

    I’d like to have just the Near/distance search box and hide/remove the other keywords box so users can enter a location and then get a list of everything near them.

    Many thanks in advance
    Scott

    #60426

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    you can with this css:

    
    
    .search_text {
        display: none !important;
    }

    However it will affect all pages, not just the home page.

    Let us know if that helped.

    Thanks

    #60529

    scottpinhorne
    Expired Member
    Post count: 8

    Hi

    I just need to remove the keywords search box from the homepage only. I would like the search bar to remain but just with the distance search option.

    Also I get an error a lot of the time with the map loading that says:

    No Records Found

    Sorry, no record were found. Please adjust your search criteria and try again.

    Many thanks in advance
    Scott

    #60597

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    the no records found is due to the default location being used on 1st load on your home page. You’ll need to change your settings GeoDirectory >> MultiLocations and use the Everywhere location instead. You should also add the location switcher somewhere. Or your users risk to get stuck in a location.

    To hide that only on the home page, You’d need to add a snippet in your fucntions.php to add a body class for the home page.

    
    
    add_filter( 'body_class', 'body_class_wpse_85793', 10, 2 );
    
    function body_class_wpse_85793( $classes, $class )
    {
        if( is_home() )
            $classes = array( 'home' );
    
        return $classes;
    }

    At this point you can use the css I gave you before adding the .home class to make it work only on the home page. Add this to GeoDirectory >> Design >> Scripts >> Custom css:

    
    
    .home .search_text {
        display: none !important;
    }
    

    Let us know how you went,

    Thanks

    #60706

    scottpinhorne
    Expired Member
    Post count: 8

    That seems to have done the trick on both points 🙂

    Thank you so much.

    Best regards
    Scott

    #60765

    Paolo
    Site Admin
    Post count: 31206

    You are welcome 🙂

Viewing 6 posts - 1 through 6 (of 6 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount