Advanced Customisations

Below you’ll find advanced customisations that aren’t included in theme 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 XML or JSON file. A XML or JSON file is provided with each function below. Right click and Save As to download.

Disable Sticky Header On Mobile

Disable the sticky header below `768px` or in the case of Polestar Premium, below the point that the Mobile Menu Collapse field is set to.

if ( ! function_exists( 'polestar_child_body_classes' ) ) :
function polestar_child_body_classes( $classes ) {
	$classes[] = 'mobile-header-ns';
  	return $classes;
add_filter( 'body_class', 'polestar_child_body_classes' );

Code Snippets Import File
Disable Sticky Header on Mobile Snippet

Disable Responsive Layout

Disable the responsive layout on mobile devices.

if ( ! function_exists( 'polestar_child_setup' ) ) :
function polestar_child_setup() {
	remove_action( 'wp_head', 'polestar_viewport_tag' );

	function polestar_child_custom_viewport_tag() { ?>
		<meta name="viewport" content="width=1280" />
	<?php }
	add_action( 'wp_head', 'polestar_child_custom_viewport_tag' );	
add_action( 'after_setup_theme', 'polestar_child_setup' );

Code Snippets Import File
Disable Responsive Layout on Mobile Devices Snippet

Last updated: 28/03/2018