Faux Full Screen Page Hero

Faux Full Screen Page Hero

Starting in GP Premium 1.7, the Full Screen option is only available when Merge with content option is selected. The reason is because Full Screen without having the header merged required javascript and was a little hacky, and it』s not truly full screen if the header isn』t merged.

However, if you would like to size the page hero so it fills the rest of the space below header and navigation, simply add the CSS snippet below:

.page-hero {
min-height: calc(100vh - 200px); /*Modify the 200px to the height of your header*/
}

Don』t know the height of your header or navigation? Start a support topic here and we will be happy to help you out

option_generate_menu_plus_settings

option_generate_menu_plus_settings

The option_generate_menu_plus_settings filter allows you to filter the options in our Menu Plus add-on.
These options are all available in the customizer. The filters allow you to change the setting under certain conditions.

Available Options

Return Value

mobile_menu_label
Set the text of your mobile menu label.

'My custom mobile menu label'

sticky_menu
Activate or disable sticky navigation.

'mobile' //mobile only
'desktop' //desktop only
'true' //both
'false' //disable

sticky_menu_logo
The URL to your navigation logo.

'URL to image'

sticky_menu_effect
Set the sticky navigation transition.

'fade'
'slide'
'none'

auto_hide_sticky
Hide the sticky navigation unless you』re scrolling up towards the top of the site.

'true'
'false'

sticky_menu_logo_position
Set the navigation logo position.

'sticky-menu' //Sticky only
'menu' //Sticky + static
'regular-menu' //Static only

mobile_header
Activate or disable the mobile header.

'disable'
'enable'

mobile_header_sticky
Activate or disable the sticky mobile header.

'disable'
'enable'

mobile_header_auto_hide_sticky
Hide the sticky mobile header unless you』re scrolling up towards the top of the site.

'true'
'false'

slideout_menu
Activate or disable slideout navigation.

'mobile' //Mobile only
'desktop' //Desktop only
'both' //On
'false'//Off

slideout_menu_side
Set the side which the slideout navigation opens from.

'left'
'right'

Example
If we want to use different settings for static home page:
add_filter( 'option_generate_menu_plus_settings','lh_custom_homepage_menu_plus_settings' );
function lh_custom_homepage_menu_plus_settings( $options ) {
if ( is_front_page() ) {
$options['mobile_menu_label'] = 'Home Page Toggle Text';
$options['sticky_menu'] = 'off';
$options['mobile_header'] = 'enable';
$options[『mobile_header_sticky』] = 'enable';
$options[『mobile_header_auto_hide_sticky』] = 'false';
}

return $options;
}

Content Layout

Content Layout

The Content Layout option found in Appearance > Customize > Layout > Container allows you to separate your website elements (content area, widgets, header, footer etc..) into separate blocks, or contain them all inside one container.
When you choose between the two options, you』ll see immediately what the difference is.

Separate Containers

One Container

Replacing the Site Footer

Replacing the Site Footer

Using a Hook Element, we can replace the default theme site footer with our own HTML.

First, create a new Hook Element.

Then, select the footer hook from the dropdown of available hooks.

When you do this, an option will appear below it asking if you』d like to disable the site footer.

Checking this option will disable the default site footer in the theme.

Now in the hook content you can build your own footer using HTML, or you can use a shortcode to a template created in your favorite page builder.

Hooks Visual Guide

Hooks Visual Guide

Hooks allows us to 「hook」 our own custom code into various areas of the theme without changing core files.
You can see all of the available hooks in GeneratePress here.
The images below provide a visual guideline of where the hooks are located.
Posts Page

Single Post

Static Page

Archives

Exclude Categories from Posts page

Exclude Categories from Posts page

Some users would like to exclude certain categories from the posts page. This can be done with the following PHP snippet:

add_filter('pre_get_posts', 'excludeCat');
function excludeCat($query) {
if ( $query->is_home ) {
$query->set('cat', '-3,-5,-23');
}
return $query;
}

Simply add your category IDs in there instead of the 3, 5 and 23 (examples) and keep the minuses in there.

Add Entry Meta to Pages

Add Entry Meta to Pages

By default, the entry meta (date and author) is only added to posts. If you would like to display entry meta on pages as well, use the PHP snippet below:

add_action( 'generate_after_entry_header', 'tu_page_meta' );
function tu_page_meta() {
if ( 'page' == get_post_type() ) : ?>


<?php endif;
}

Missing style.css

Missing style.css

When you purchase GP Premium, you may assume that it』s a theme which you need to install via the 「Themes」 area of your WordPress Dashboard. Doing so will result in an error telling you that the theme is missing the style.css stylesheet.
This is happening because GP Premium is actually a plugin.
This means you need to upload it through the 「Plugins」 area of the Dashboard.
For step by step instructions on how to install GP Premium, check out this article.

Content Container

Content Container

Starting in GeneratePress 3.0, the previous Page Builder Container option has been renamed to Content Container option.

Default

The default option means that the Content Padding option in the customizer would apply:

Full Width

The Full Width option set the content area to be 100% of the screen width and allows for full width sections using GenerateBlocks or page builders.

This option also remove the default content padding set in the customizer so GenerateBlocks or page builders can have complete control of the content padding.

Contained

The Contained option simply removes the content padding set in the customizer so GenerateBlocks or page builders can have complete control of the content padding.

Apply the Option to Multiple Pages or Globally

The Layout metabox shown in the first screenshot here allows you to choose the setting per page. You can also create a Layout Element to apply the setting to multiple pages/posts or globally.

generate_woocommerce_menu_item_location

generate_woocommerce_menu_item_location

The generate_woocommerce_menu_item_location allows you to change where the WooCommerce cart icon is displayed. If you want the cart icon from primary menu to secondary menu, try this PHP snippet below:

add_filter( 'generate_woocommerce_menu_item_location', 'tu_move_menu_cart_item' );
function tu_move_menu_cart_item() {
return 'secondary';
}