Site logo

Archived topic

Web-Stories - Archives

1 reply · Started by Kevin on April 29, 2022

Viewing posts 1–2 of 2

My web-stories files also require web-storie, but I don't want multiple web-stories being displayed on a page... I believe this happens because the blog files show a summary of the post. So the web-stories being displayed is the excerpt resume.

There is a code where I can put in the elements, in php, to configure those files without displaying theexcerpt summary? Only in web-stories files.

Hi there,

You can try adding this PHP snippet to set the Exceprt length to 0 on the web-story post type:

add_filter( 'excerpt_length', function($length){
  if ( 'web-story' === get_post_type() ) {
    return 0;
  } 
  return $length;
}, 1000);

Adding PHP: https://docs.generatepress.com/article/adding-php/

This archived topic is closed to new replies.