Home › Forums › Support › Remove default content in search page This topic has 1 reply, 2 voices, and was last updated 3 years, 3 months ago by David. Viewing 2 posts - 1 through 2 (of 2 total) Author Posts January 23, 2023 at 2:40 am #2505549 Raffaele Salvemini Hi, I need to remove the default code in the search result page. I will add my custom code, but I cannot find a way to completely remove the default code, it there a PHP code to do it? Thanks a lot! January 23, 2023 at 5:37 am #2505741 DavidStaff Customer Support Hi there, in the theme archive and search templates we add the generate_has_default_loop function: https://github.com/tomusborne/generatepress/blob/e7fbf5693bfe4325a41cae988e3eda16550d4025/search.php#L24 Which you can use to disable the themes loop like so: add_filter( 'generate_has_default_loop', function(){ if ( is_search() ) { return false; } return true; }); Then you can use the generate_before_main_content or the generate_after_main_content hooks to add in your own code. Let me know if you need more info 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