Site Title & Tagline
Adding a Logo/Header
Place Logo Next to Title
Site Title & Tagline
Adding a Logo/Header
Place Logo Next to Title
By default, the archive page title is simply the name of the category or tag.
If you want to use a custom title instead, try this PHP snippet:
add_filter( 'get_the_archive_title', function( $title ) {
if ( is_category( 'CATEGORY NAME' ) ) {
$title = 'YOUR CUSTOM TITLE';
}
return $title;
}, 50 );
See more information on WordPress Conditional Tags.
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.
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' );
If you install a Site and decide you don』t want it, or you want to install a different one, head back into the main Site Library page and you』ll see the below message.
When you import a site, we take a quick backup of your existing settings first. If you decide to remove the imported site, we will restore those settings we took a backup of.
The removal process does make changes to your database, so if you have data you don』t want to risk losing, please take a site backup before doing this process.
It is possible to click the 「Skip」 link and install another site on top of the site you already imported. However, remember that the backup is taken as you import a site, so if you import on top of another import, you will be taking a backup of the previously imported site. This means you won』t be able to go back to how your site was before the first site import.
The generate_back_to_top_output filter allows you to change the HTML markup of the back to top button.
The generate_after_primary_menu hook is placed right before the end of .inside-navigation.
The generate_site_title_output allows allows us to alter the HTML of our site title.
Example
If we don』t want a link surrounding the title:
add_filter( 'generate_site_title_output', function( $output ) {
return sprintf(
'
%3$s
',
( is_front_page() && is_home() ) ? 'h1' : 'p',
esc_url( apply_filters( 'generate_site_title_href', home_url( '/' ) ) ),
get_bloginfo( 'name' )
);
});
GeneratePress no longer includes Font Awesome directly in the theme. Instead, you should use the official Font Awesome plugin to add it to your site when needed.
Old Theme Version
If you』re still using the Font Awesome 4 version that was included in the theme, you can remove it super easily by going to Customize > General and checking the Load essential icons only option.
Once this option is checked and saved, it will disappear the next time you load the Customizer.
The generate_after_loop hook is placed right after the posts loop on archive pages.