Site logo

Archived topic

'generate_blog_single_featured_image' for page not only post

9 replies · Started by Jean on September 4, 2020

Viewing posts 1–10 of 10

Hi there,

I tried to remove featured image inside inside-articletag. On single page it work's with :
remove_action('generate_before_content', 'generate_blog_single_featured_image')

How do I do the same for page please ?

Thanks

Hi there,

you don't need to use that Snippet.
Instead do this:

1. In Appearance > GeneratePress enable the Disable Elements and Elements modules
2. In Appearance > Elements create a new Layout Element
Disable the Featured Image
And set the Display Rules Location: Posts > all posts and Pages > All pages.

https://docs.generatepress.com/article/layout-element-overview/

Hi,
thanks for quick answer.
I prefer to do that with hooks and filer since the end user can't change theese settings.
Are you sure it's not possible ?

Thanks again,

Try this:

remove_action( 'generate_before_content', 'generate_featured_page_header_inside_single', 10 );

Sorry but doesn't works (I tried)

What is your featured image location setting for pages?

On top of title, for page and posts

Hi Leo,

Sorry for the long response time, I was very busy with the rest of the project.
Indeed, I prefer to use hooks and functions. :)
Thanks for this one.
Your support is really efficient!
See you soon,

No problem :)

This archived topic is closed to new replies.