[Support request] Return the header of my post

Home Forums Support [Support request] Return the header of my post

Home Forums Support Return the header of my post

Viewing 3 posts - 16 through 18 (of 18 total)
  • Author
    Posts
  • #1520656
    David
    Staff
    Customer Support

    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/

    #1524968
    Simone

    Thank you, David. Where on my website can I put this code? In an HTML widget?

    #1525063
    David
    Staff
    Customer Support

    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.

Viewing 3 posts - 16 through 18 (of 18 total)
  • You must be logged in to reply to this topic.