Site logo

Archived topic

Blocked articles show excerpt

5 replies · Started by Streater on October 1, 2021

Viewing posts 1–6 of 6

Hi there,

you could use a Block Element - and add the GP Dynamic Content Block and set it to excerpt.
Then set the hook for where you want it displayed

I do have a header element already for posts.

I tried using <?php the_excerpt(); ?> in that for the excerpt but that didn't work.

You can't add PHP to a Header Element.
Use a Hook Element with that PHP, set the Hook to generate_after_header and its priority to 25

Hmmmmm. Doesn't seem to be working.

I created this hook:

<?php
add_action( 'generate_after_header','excerpt_function_name' );
function excerpt_function_name() {  
    the_excerpt();
}

On the Elements I chose Hook: Custom Hook ; Execute PHP checkbox checked ; Priority: 25 ; Location : Post Category : Newsroom

This archived topic is closed to new replies.