Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Stories Archives for Web Stories

  • https://wordpress.org/plugins/web-stories/ by default creates a stories archive page /web-stories

    On that archive page, you can find featured images/cover pages, title and embedded stories (story slides) just to name a few.

    I was wondering how to remove (not just hide with css) those embedded stories. The other user raised a similar question here https://generatepress.com/forums/topic/web-stories-archives/ and I applied the code provided by David, but unfortunately it didn’t work.

    Any help would be greatly appreciated!

  • Hi there,

    apologies for the late reply – your topic slipped through out system.

    Can you share link to your site where i can see the WebStories ?

  • Hi David, thank you for your reply. I sent you a private message in the Private information box. Please let me know if you have any questions.

  • Hi Jeanzahn,

    To clarify, do you want to remove the story functionality or the actual Stories from the archive page? Can you explain a bit more and provide an example of the scenario you want to achieve?

  • Hi fernandoazarcon2, thank you for reaching out. I just wanted to disable these excerpts (if I understand it correctly) and keep the stories archive page in the same layout as it of my category page: users click on the covered images or titles to see the stories just like users click on featured images or titles to see the posts on a typical category page.

    https://ibb.co/9t7rndT

    If using css, it only hides them. Therefore, I prefer a php solution to disable them for the sake of the size of loading page.

    Please let me know if you still have any questions and thank you for looking into this for me or other GP customers.

  • I see. How did you add this snippet?:

    add_filter( 'excerpt_length', function($length){
      if ( 'web-story' === get_post_type() ) {
        return 0;
      } 
      return $length;
    }, 1000);
  • Hi fernandoazarcon2, I tried this piece of code found on https://generatepress.com/forums/topic/web-stories-archives/ already but it didn’t work. That was why reached out.

  • For clarity, did you add that code through functions.php on a Child theme or a plugin like Code Snippets?

  • Hi fernandoazarcon2, I used the plugin Code Snippets to add the code.

  • Can you try something like this instead?:

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

    Let us know how it goes

  • Hi fernandoazarcon2, thank you but unfortunately, they still remain.

    My site is fairly new with little to none customization, but if you need me to set up a testing site, I can try to get you one.

  • Also I wanted to point it out that I tested the stories archive page on a fresh server with WP’s default twenty twenty three theme installed, those story autoplays ain’t there.

  • I see. Just for testing, if you set the excerpt count to 0 in Appearance > Customize > Layout > Blog, does it make the story disappear?

  • Hi fernandoazarcon2, I did that already before I reached out. I thought it would remove those autoplays (that I thought were excerpts) too…

    In addition, I even tried what @Ying suggested in this thread https://generatepress.com/forums/topic/remove-excerpt-entry-summary-on-cpt-archive-page/ , although I’m not sure if it is relevant…

    The bottom line is I tried everything before I reached out.

  • Do you use the Block Editor ?
    If so you could design your own archive content templates using a block element.

    Let me know

  • Hi @David, could you please provide me an instruction to achieve the web stories archive page using a block element? I don’t need a fancy design but something that is consistent with my category archive pages (you can find in the private information area).

    Thank you

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