Home › Forums › Support › Is it possible to show on element only on the first page or an archive? This topic has 7 replies, 2 voices, and was last updated 3 years, 6 months ago by Leo. Viewing 8 posts - 1 through 8 (of 8 total) Author Posts September 22, 2020 at 12:45 pm #1454388 Samuel The subject says it all–is there a way I can show an element on a blog page but only on the first page? September 22, 2020 at 12:46 pm #1454390 LeoStaff Customer Support Hi there, See the second example here: https://docs.generatepress.com/article/generate_header_element_display/#examples Adding PHP: https://docs.generatepress.com/article/adding-php/ Let me know if this helps π September 22, 2020 at 1:28 pm #1454430 Samuel Unless I’m missing something this doesn’t cover my use case. My use case is: On the blog page insert a block element using the before content hook. However I want to only show this element on the first page of the blog archive. September 22, 2020 at 1:30 pm #1454435 LeoStaff Customer Support It should work just with a different filter: add_filter( 'generate_block_element_display', function( $display ) { if ( is_paged() ) { $display = false; } return $display; } ); Let me know π September 22, 2020 at 1:53 pm #1454457 Samuel Got it–what is available to the filter to target that one element? Is the id, etc passed to the filter? September 22, 2020 at 1:55 pm #1454458 LeoStaff Customer Support Yup – check out the first example here: https://docs.generatepress.com/article/generate_header_element_display/#examples September 23, 2020 at 3:44 am #1455119 Samuel Got it thanks September 23, 2020 at 7:57 am #1455532 LeoStaff Customer Support No problem π Author Posts Viewing 8 posts - 1 through 8 (of 8 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In