Advanced Customizations

Below you’ll find advanced customisations that are outside the scope of SiteOrigin Premium settings. These customisations 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 SnippetsImport.
  3. Import the function provided in the form of a JSON file. A JSON file is provided with each function below. Right click and Save As to download.

Enable the LiveMesh Grid Widget in the SiteOrigin Tabs Widget

By default, the LiveMesh Grid widget doesn’t function correctly in the SiteOrigin Tabs widget Layout Builder. The following customization fixes this problem.

Code Snippets Import File
SiteOrigin Tabs Livemesh Grid.

Enable the SiteOrigin Post Loop Widget: Masonry Layout in the SiteOrigin Tabs Widget

If you’re using SiteOrigin Corp and have inserted a SiteOrigin Post Loop widget with Masonry layout into the SiteOrigin Tabs widget, there will be no problem if the tab used is the initially selected tab (the tab that’s open on page load). However, if you’d like to use the Masonry layout in a tab that isn’t open by default, the following snippet will be required.

Code Snippets Import File
Enable the Corp Masonry Layout in the Tabs Widget. Once downloaded, un-zip the file before importing into Code Snippets plugin.

Disable Automatic Plugin Update Checks

Using the below filter will prevent SiteOrigin Premium from checking for updates unless you’re viewing DashboardUpdates or the plugins ‘Update Available’ page.

add_filter( 'siteorigin_premium_background_update_check_enabled', '__return_false' );

Code Snippets Import File
Disable SiteOrigin Premium Automatic Plugin Update Checks.

Disable Plugin Recommendations

Plugin recommendations can be dismissed using the dismiss link in the notification bar. If for any reason this isn’t working, perhaps due to a plugin conflict, recommendations can be disabled using the following filter. This filter should be added via the Code Snippets plugin or from within a custom plugin to work.

add_filter( 'siteorigin_premium_use_tgmpa', '__return_false' );

Code Snippets Import File
Disable SiteOrigin Premium Plugin Recommendations.

Bulk Activate All SiteOrigin Premium Addons

The following function can be used to bulk enable all SiteOrigin Premium addons.

function so_enable_all_addons() {
	update_option(
		'siteorigin_premium_active',
		array(
			'plugin/lightbox' => true,
			'plugin/woocommerce-templates' => true,
			'plugin/accordion' => true,
			'plugin/animations' => true,
			'plugin/cta' => true,
			'plugin/hero' => true,
			'plugin/cpt-builder' => true,
			'plugin/image-overlay' => true,
			'plugin/social-widgets' => true,
			'plugin/map-styles' => true,
			'plugin/tooltip' => true,
			'plugin/testimonial' => true,
			'plugin/toggle-visibility' => true,
			'plugin/contact-form-fields' => true,
			'plugin/web-font-selector' => true,
			'plugin/tabs' => true,
			'plugin/parallax-sliders' => true,
			'plugin/mirror-widgets' => true,
		)
	);

	if ( class_exists( 'SiteOrigin_Settings' ) ) {
		$settings = SiteOrigin_Settings::single();
		$settings->set( 'blog_ajax_comments', true );
	}
}
add_action( 'init', 'so_enable_all_addons' );

Code Snippets Import File
Activate All SO Premium Addons.