generate_page_hero_post_author

generate_page_hero_post_author

The generate_page_hero_post_author allows us to alter the HTML of the post author when using {{post_author}} template tag in header element.

Example

If we don』t want a link surrounding the post author:

add_filter( 'generate_page_hero_post_author', function() {
global $post;
$author_id = $post->post_author;

return sprintf( '%s',
esc_html( get_the_author_meta( 'display_name', $author_id ) )
);
} );

generate_page_hero_location

generate_page_hero_location

The generate_page_hero_location allows you to move a page hero to other available hooks.

For example, the following PHP snippet would move it to the generate_before_content hook:

add_filter( 'generate_page_hero_location', function() {
return 'generate_before_content';
} );

Footer Widget & Footer Padding

Footer Widget & Footer Padding

Note: These options require the Spacing add-on in GP Premium.

We can adjust the padding of the footer widget area and the footer area (copyright) in Customize > Layout > Footer.

Footer Widget Area

You can change the amount of space surrounding your footer widgets using these options.

Note that this can be adjusted separately for desktop and mobile by using the toggle buttons.

Footer (Copyright area)

The copyright area also has padding options you can adjust.

Container Alignment

Container Alignment

GeneratePress has always used a box alignment to display your content and sidebars. This means the edges of the boxes align with the header/footer.

This can become an issue when your body and content background colors match. For example:

Starting in GeneratePress 2.3, the new container alignment option fixes this for us:

Header Padding

Header Padding

Note: This option requires the Spacing add-on in GP Premium.

You can adjust the padding inside your header container in Appearance > Customize > Layout > Header.

The value you see is in pixels, and controls the amount of space between the edge of your header container and content inside of it:

Note that this can be adjusted separately for desktop and mobile by using the toggle buttons.

Navigation Logo

Navigation Logo

Note: This option no longer exists as of GP Premium 1.8. Please see our Navigation as Header option instead.

You can upload a logo inside your navigation by going to Customize > Layout > Primary Navigation.

See this article if you wish to display your site title instead of navigation logo.

Uploading a navigation logo will place it inside your navigation to the left of your menu items.

The Navigation Logo Position option has 3 choices:

Sticky – your navigation logo will only appear in the sticky navigationStatic – your navigation logo will only appear in your static navigation – meaning it』s not sticky.Sticky + Static – your navigation logo will appear in both your sticky and static navigation.

Float Navigation Logo Outside Container

Float logo outside container

The steps above show you how to use the navigation as header. In some cases, users would like to float the logo outside the container.

Activate Use Navigation as Header option.Add the following CSS:

.main-navigation .site-logo.navigation-logo {
position: absolute;
left: 0;
top: 0;
}
.main-navigation .site-logo.navigation-logo img {
height: auto; /* Set the image height of logo in px */
}

Widget Padding

Widget Padding

Note: These options require the Spacing add-on in GP Premium.

You can adjust the spacing inside your sidebar widgets (padding) in Customize > Layout > Sidebars.

You can adjust either four sides of the widget, and the value is in pixels.

Note that this can be adjusted separately for desktop and mobile by using the toggle buttons.

Changing the Copyright Message

Changing the Copyright Message

You can change the copyright message in the footer of your website using our Copyright add-on in GP Premium, or using a function.

Using the Copyright add-on

First, make sure the Copyright add-on is activated under Appearance > GeneratePress

You can find the copyright setting in Customize > Layout > Footer.

Using a function

If you don』t have GP Premium, you can use a function instead. This function requires at least GeneratePress 1.3.42.

add_filter( 'generate_copyright','tu_custom_copyright' );
function tu_custom_copyright() {
?>
Your new message in here. You can add anything you want, including PHP and HTML.
<?php
}

Learn how to add PHP here.

Removing the entire footer bar

You can remove the entire footer area with a simple function:

add_action( 'after_setup_theme', 'tu_remove_footer_area' );
function tu_remove_footer_area() {
remove_action( 'generate_footer','generate_construct_footer' );
}

Learn how to add PHP here.

generate_more_jump

generate_more_jump

The generate_more_jump filter allows you to remove or change the #more-x anchor that』s added to your read more URLs when using the more tag.

Default (string): #more-PAGEID

Usage

To remove the more anchor, simply add this PHP:

add_filter( 'generate_more_jump', '__return_false' );