Site logo

Archived topic

Infinite Category

7 replies · Started by Simone on June 13, 2022

Viewing posts 1–8 of 8

Hi Fernando,

Thank you for your reply. Should I put the code of the snippet? If so, can you please tell me where? Thank you

Hi there,

you have two options:

1. You can edit the Post(s) and change the Post Format from Video to Standard.

OR

2. You can add the PHP Snippet to your site.
This doc explains how to add the code:

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

TLDR: Are you using a Child Theme?
If Yes - add the code to the Child Theme > functions.php file
If No - install the Code Snippets plugin and add the code using a new snippet

Hi David,
Thank you. One more question, please. Which of these codes do I have to add to the child theme? And where exactly in the child theme?
Thanks again again

If you want to go with the 2nd option David suggested, you can add this code to your child theme's functions.php file.

add_filter( 'generate_show_excerpt', function( $show ) {
    if ( 'standard' !== get_post_format() && ! $show ) {
        return true;
    }
    return $show;
} );

Hi Ying, thank you!

No problem :)

This archived topic is closed to new replies.