Home › Forums › Support › Display hook using Elements only on first page of Woocommerce archive This topic has 10 replies, 2 voices, and was last updated 5 years ago by David. Viewing 11 posts - 1 through 11 (of 11 total) Author Posts March 28, 2021 at 1:56 am #1712629 Thomas Hi, trying to make this work since a few hours, I found this snippet : https://generatepress.com/forums/topic/element-hook/#post-1012294 Which I added to my child theme function.php but it seem to be not working. Any suggestion please ? March 28, 2021 at 3:58 am #1712702 DavidStaff Customer Support Hi there, can you share a link to the site so i can see what the archive pagination is doing ? March 28, 2021 at 6:05 am #1712763 Thomas Answered in private mode March 28, 2021 at 12:45 pm #1713208 DavidStaff Customer Support The ID has to be that of the Element – if you edit the element and take the ID in the URL. March 29, 2021 at 5:11 am #1713850 Thomas Ok, so I finally ended up by replacing the 10 value by 4625 that I found in Element URL as following : /post.php?post=4625&action=edit But finally, still same. I have no cache plugin and clear my browser cache just in case. Any idea please ? March 29, 2021 at 5:15 am #1713855 Thomas Just in case, here is the code snippet in child theme function.php add_filter( ‘generate_hook_element_display’, function( $display, $element_id ) { if ( 4625 === $element_id && is_paged() ) { $display = false; } return $display; }, 10, 2 ); March 29, 2021 at 5:48 am #1713897 DavidStaff Customer Support Is it a Hook Element that are you using ? If so what is it displaying ? March 29, 2021 at 6:14 am #1713929 Thomas I’m displaying a “Block – Hook” Element with 5 paragraphs of Lorem Ipsum at the bottom of the page. March 29, 2021 at 6:18 am #1713936 DavidStaff Customer Support In your filter snippet change: generate_hook_element_display to generate_block_element_display March 30, 2021 at 8:09 am #1715572 Thomas Super, it’s working perfectly. Thanks a lot David ! Using GP on more and more projects and still learning news things each time 😀 March 30, 2021 at 4:59 pm #1716002 DavidStaff Customer Support Glad to hear that! Author Posts Viewing 11 posts - 1 through 11 (of 11 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In