Reply To: Different Layout

Home Forums Support Different Layout Reply To: Different Layout

Home Forums Support Different Layout Reply To: Different Layout

#155183
Tom
Lead Developer
Lead Developer

You can do this using a function like this:

add_filter( 'generate_option_defaults','generate_change_values' );
function generate_change_values( $generate_defaults )
{
	// If we're on the blog, change the navigation position setting
	if ( is_home() ) {
		$generate_defaults['nav_position_setting'] = 'nav-above-header';
	}
	
	// Return the rest of the values
	return $generate_defaults;
}

Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/

You can use WordPress conditions to target pages etc..: https://codex.wordpress.org/Conditional_Tags

To get the setting name and values, use Inspect Element in the Customizer.