Disable search in Sonata Admin

You need to override the standard_layout.html.twig template and overwrite the block sonata_top_bar_search with nothing in it. That will make it disappear.

sonata_admin:
    templates:
        layout:  YourBundle::layout.html.twig

Read more here about customizing templates.


Just complementing the answers here, the complete solution:

config.yml

sonata_admin:
    templates:
        layout:  AppBundle::layout.html.twig

AppBundle::layout.html.twig

{% extends 'SonataAdminBundle::standard_layout.html.twig' %}

{% block sonata_sidebar_search %}
{% endblock sonata_sidebar_search %}

In Sonata Admin v3 it's as simple as:

sonata_admin:
    search: false