Archived topic
Return the header of my post
17 replies · Started by Simone on November 1, 2020
If you put the Header element back in for your posts.
Then add this PHP Snippet to your site, it will move the header element to where the featured image is normally displayed:
add_filter( 'generate_page_hero_location', function( $location ) {
if ( is_single() ) {
$location = 'generate_before_content';
}
return $location;
} );
How to add PHP:
https://docs.generatepress.com/article/adding-php/
Thank you, David. Where on my website can I put this code? In an HTML widget?
That code is PHP, this article explains how to add this:
https://docs.generatepress.com/article/adding-php/
TLDR: If you're using a Child Theme then add the code to Child Theme > functions.php. If you're not using a Child Theme then install the Code Snippets plugin and add this to a new Snippet.