Search for: Log In Free Support [Resolved] Disable Elements from AMP Home › Forums › Support › Disable Elements from AMP This topic has 1 reply, 2 voices, and was last updated 8 months, 3 weeks ago by Tom. Viewing 2 posts - 1 through 2 (of 2 total) Author Posts June 5, 2020 at 1:53 pm #1316133 stephen Do you know if there is a way to disable Elements from the AMP pages? There is exclude, I see that but AMP isn’t an option. reason I ask is because I got elements showing up that I’d use for the regular site on the AMP themed site. June 6, 2020 at 9:40 am #1317046 TomLead Developer Lead Developer Hi there, You won’t find this in the Display Rules, but you can use a filter depending on the Element: https://docs.generatepress.com/article/generate_header_element_display/ https://docs.generatepress.com/article/generate_hook_element_display/ https://docs.generatepress.com/article/generate_layout_element_display/ For example: add_filter( 'generate_hook_element_display', function( $display, $element_id ) { if ( 123 === $element_id ) { // Update ID to match your Element. if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) { $display = false; } } return $display; }, 10, 2 ); Documentation: http://docs.generatepress.com/ Adding CSS: http://docs.generatepress.com/article/adding-css/ Ongoing Development: https://generatepress.com/ongoing-development Author Posts Viewing 2 posts - 1 through 2 (of 2 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In