option_generate_settings

The option_generate_settings filter allows you to filter the options in our free theme.

These options are all available in the customizer. The filters allow you to change the setting under certain conditions.

Available Options

Return Value

$options[‘hide_title’]

Remove site title.

'true'
'false'

$options[‘hide_tagline’]

Hide site tagline.

'true'
'false'

$options[‘container_width’]

Set the container width

'1200'  //from 700 to 2000 in increment of 5

$options[‘top_bar_width’]

Set the outer width of top bar.

'full'
'contained'

$options[‘top_bar_inner_width’]

Set the inner width of top bar.

'full'
'contained'

$options[‘top_bar_alignment’]

Set the alignment of top bar.

'left'
'center'
'right'

$options[‘header_layout_setting’]

Set the outer width of header.

'fluid-header' //full
'contained-header' //contained

$options[‘header_inner_width’]

Set the inner width of header.

'contained' //contained
'full-width' //full

$options[‘header_alignment_setting’]

Set the alignment of header.

'left'
'center'
'right'

$options[‘nav_layout_setting’]

Set the outer width of primary navigation.

'fluid-nav' //full
'contained-nav' //contained

$options[‘nav_inner_width’]

Set the inner width of primary navigation.

'contained' //contained
'full-width' //full

$options[‘nav_alignment_setting’]

Set the alignment of primary navigation.

'left'
'center'
'right'

$options[‘nav_position_setting’]

Set the position of primary navigation.

'nav-below-header'
'nav-above-header'
'nav-float-right'
'nav-float-left'
'nav-left-sidebar'
'nav-right-sidebar'
''//no navigation

$options[‘nav_dropdown_type’]

Set the how the dropdown menu is initiated.

'hover'
'click'
'click-arrow'

$options[‘nav_search’]

Activate or disable navigation search

'enable'
'disable'

$options[‘content_layout_setting’]

Choose to use separate container or one container

'separate-containers'
'one-container'

$options[‘footer_layout_setting’]

Set the outer width of footer.

'fluid-footer'
'contained-footer'

$options[‘footer_inner_width’]

Set the inner width of footer.

'contained'
'full-width'

$options[‘footer_bar_alignment’]

Set the alignment of footer.

'left'
'center'
'right'

$options[‘back_to_top’]

Activate or disable the back to top button.

'enable'
'' //disable

$options[‘post_content’]

Choose to show full post or excerpt.

'full'
'excerpt'

Example

If we want to use different settings for single posts:

add_filter( 'option_generate_settings','lh_single_posts_settings' );
function lh_single_posts_settings( $options ) {
    if ( is_single() ) {
        $options['nav_position_setting'] = 'nav-above-header';
        $options['nav_alignment_setting'] = 'center';
    }
    
    return $options;
}