Site logo

Archived topic

Search Page Font Size

5 replies · Started by Praveen on July 28, 2020

Viewing posts 1–6 of 6

Hi guys,

I want to reduce the H1 post size used in search result page. and also eliminate pages from the search results too.

Can you please help?

Hi there,

Give this a shot:

.search h1 {
    font-size: 20px;
}

If you need to set mobile specific:

@media (max-width: 768px) {
    .search h1 {
        font-size: 20px;
    }
}

Hi, thanks but this has no effect.

Worked! Also how to take care of the second one? -- > eliminate pages from the search results too.

Try this PHP snippet:

add_filter( 'generate_navigation_search_output', function() {
    printf(  
        '<form method="get" class="search-form navigation-search" action="%1$s">
            <input type="search" class="search-field" value="%2$s" name="s" title="%3$s" />
            <input type="hidden" name="post_type" value="post" />
        </form>', 
        esc_url( home_url( '/' ) ), 
        esc_attr( get_search_query() ),   
        esc_attr_x( 'Search', 'label', 'generatepress' ) 
    ); 
} );
This archived topic is closed to new replies.