• Resolved New Rise Digital

    (@new-rise-digital)


    How can I remove the location from the search box on the home page (or anywhere where the search box code appears). I have worked out how to set the display:none in the CSS for the location box in search, but i lose the centering of the search bar when I add that css

Viewing 2 replies - 1 through 2 (of 2 total)
  • Removing the location field completely from the search box will result in an error. It is better to contact a developer for adding and removing core functionalities of the plugin. However, in your case, hiding location field from search page using CSS should work. And here is the solution to the problem you are facing with CSS.

    The location field uses 25% width. So, when you hide it using, you should give this width to other fields or set margin-left : 12.5% to the search bar. here is some sample css, you can adjust according to your need.

    // for centering the fields without altering their size.

    .directorist .directory_main_content_area .single_search_field.search_query, .directorist .directory_custom_suggestion{
     margin-left:12.5%;
    }
    .directorist .directory_main_content_area .single_search_field.search_location{
     display:none;
    }

    // altering the width of the search input field to use the width of the location field so that they display nice and center.

    .directorist .directory_main_content_area .single_search_field.search_query, .directorist .directory_custom_suggestion{
     width:70%;// we have added extra width recieved from location field 45%+25% = 70%
    }
    .directorist .directory_main_content_area .single_search_field.search_location{
     display:none;
    }

    Feel free to ask if you need any more help.

    Thread Starter New Rise Digital

    (@new-rise-digital)

    Thank you for the awesome support!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Removing location search’ is closed to new replies.