generate_search_button

generate_search_button

The generate_search_button filter allows you to change the default Search text in your search button.

Default (string): Search

Adding a Font Icon

If you』re using the GP font icons, you can add this PHP:

add_filter( 'generate_search_button', function() {

return '';

} );

view raw

gistfile1.txt

hosted with ❤ by GitHub

View the code on Gist.

Then add this CSS:

.widget_search .search-submit {
display: block;
font-family: GeneratePress;
}

.search-form {
display: flex;
}

Usage

Please refer to the Using Filters article to learn how to use this filter.

generate_mobile_menu_media_query

generate_mobile_menu_media_query

Starting in GeneratePress 2.3, the generate_mobile_menu_media_query allows us to change when the mobile menu is initiated.

Default: 768px

To change the breakpoint to 1000px, we can use the follow PHP snippet:

add_filter( 'generate_mobile_menu_media_query', function() {
return '(max-width: 1000px)';
} );

If you change the media query with the above filter, you should also set the not mobile media query filter. This should be your breakpoint value + 1.

add_filter( 'generate_not_mobile_menu_media_query', function() {
return '(min-width: 1001px)';
} );

generate_show_block_editor_styles

generate_show_block_editor_styles

The generate_show_block_editor_styles allows you to remove all front-end styles, including colors, typography, in the block editor to make it easier to edit in certain cases and color schemes.

To remove the front-end styles, add this PHP snippet:

add_filter( 'generate_show_block_editor_styles', '__return_false' );

Place Logo Next to Title

Place Logo Next to Title

Starting in GeneratePress 2.3, we』ve added an option to inline your logo and site branding (site title/tagline). This gives you a much better layout for those of you who wish to use both in their header.

Container Alignment

Container Alignment

GeneratePress has always used a box alignment to display your content and sidebars. This means the edges of the boxes align with the header/footer.

This can become an issue when your body and content background colors match. For example:

Starting in GeneratePress 2.3, the new container alignment option fixes this for us: