[Resolved] Different Layout

Home Forums Support [Resolved] Different Layout

Home Forums Support Different Layout

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #155075
    Alejandra Arango

    I want to create a new layout (different logo, menu position, …) using GeneratePress theme and apply it to a single page in my site (that has already a GeneratePress theme installed). Is it possible?

    #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.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.