Advanced Customizations

Below you’ll find advanced customizations that aren’t included in theme settings. These customizations can either be added to a child theme functions.php file or by using the plugin Code Snippets. If you’d like to add a function using Code Snippets:

  1. Install and active the plugin, Code Snippets.
  2. Go to SnippetsAdd New.
  3. Name the snippet as you’d like to. Copy and paste the snippet into the provided field. Save and Activate.

Disable Google Fonts

The following filter allows you to choose the Google Fonts you’d like to use in the Vantage Customizer settings but self-host the font families. Vantage will output the necessary styles but won’t import the font from Google.

add_filter( 'vantage_import_google_fonts', '__return_false' );

Change from Google to Bunny Fonts

Bunny Fonts is GDPR compatible.

add_filter( 'siteorigin_web_font_url', function( $url ) {
	return '';
} );

Change Page Settings Defaults

Using the below function, you can adjust the page settings defaults. For example, if you’d like to set new posts and pages to default to Layout: No Sidebar, you could use the following function:

function vantage_child_alter_page_setting_defaults( $defaults, $type, $id ) {
	$defaults['layout'] = 'no-sidebar';

	return $defaults;
add_filter( 'siteorigin_page_settings_defaults', 'vantage_child_alter_page_setting_defaults', 15, 3 );

To view the available settings and values, please see the page-settings.php file on GitHub.

Code Snippets Import File
Page Settings Defaults. (The JSON file must be unzipped before importing into Code Snippets.)

Prevent Vantage Mobile Menu from Targeting wpForo Menu

function vantage_wpforo_menu_fix( $nav_menu, $args ) {
	$args = (object) $args;

	if ( $args->theme_location == 'wpforo-menu' ) {
		remove_filter( 'wp_nav_menu', 'siteorigin_mobilenav_nav_filter', 10, 2 );
		remove_filter( 'wp_page_menu', 'siteorigin_mobilenav_nav_filter', 10, 2 );

	return $nav_menu;
add_filter( 'wp_nav_menu', 'vantage_wpforo_menu_fix', 1, 2 );
add_filter( 'wp_page_menu', 'vantage_wpforo_menu_fix', 1, 2 );

Code Snippets Import File
wpForo Compatibility Snippet (The JSON file must be unzipped before importing into Code Snippets.)

Enable Widgets Block Editor

Vantage opts out of the Widgets Block Editor. You can opt-in using the following filter.

add_filter( 'siteorigin_settings_disable_new_widget_area', '__return_false' );

Code Snippets Import File
Enable Widgets Block Editor Snippet (Right Click and Save As)