Home › Forums › Support › Load more button on AMP This topic has 7 replies, 4 voices, and was last updated 5 years, 4 months ago by Tom. Viewing 8 posts - 1 through 8 (of 8 total) Author Posts November 22, 2020 at 10:16 am #1541336 ETO The load more button does not work on AMP pages. November 23, 2020 at 1:25 am #1541900 DavidStaff Customer Support Hi there, Load More requires Javascript – and AMP pages do not allow Javascript. You could try adding this PHP Snippet to disable the Load more on AMP Pages: add_filter( 'option_generate_blog_settings', 'db_disable_infinite_scroll_amp' ); function db_disable_infinite_scroll_amp( $options ) { if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) { $options['infinite_scroll'] = false; $options['infinite_scroll_button'] = false; } return $options; } More info on the filter: https://docs.generatepress.com/article/option_generate_blog_settings/ November 23, 2020 at 10:06 am #1542763 ETO Can I add this PHP code using elements > hook ? November 23, 2020 at 12:29 pm #1542992 ElvinStaff Customer Support Hi, Can I add this PHP code using elements > hook ? It isn’t recommended as it can cause issues. This should ideally be added to a Child theme’s functions.php or by using plugins like Code Snippet plugin. – https://docs.generatepress.com/article/adding-php/ November 24, 2020 at 12:41 pm #1545045 ETO Thank you so much! I added the code and it hides the load more button. But, there appears pagination instead of load more button. Could you please give me the necessary code to hide the pagination on these page on AMP pages? November 25, 2020 at 10:12 am #1546842 TomLead Developer Lead Developer Just to confirm, you’re wanting to remove pagination completely on AMP? November 25, 2020 at 10:30 am #1546884 ETO Yes, I want to remove them as they do not appear on normal pages. I do not want them to be indexed by Google. November 25, 2020 at 2:41 pm #1547650 TomLead Developer Lead Developer You could try this: add_action( 'wp_head', function() { if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) { echo '<style>.paging-navigation {display: none;}</style>'; } } ); 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