Home › Forums › Support › Search box on posts page This topic has 5 replies, 2 voices, and was last updated 5 years, 2 months ago by Leo. Viewing 6 posts - 1 through 6 (of 6 total) Author Posts March 13, 2018 at 5:53 pm #519285 Denis Hello, I want to display a search box on top (like on this website) on blog posts page only. How could I do it? Thanks in advance. March 13, 2018 at 7:18 pm #519323 LeoStaff Customer Support Hi there, Try adding this: <?php get_search_form(); ?> In the Before Content hook: http://demo.generatepress.com/hook-locations/ https://docs.generatepress.com/article/hooks-overview/ Make sure execute PHP is checked. March 13, 2018 at 9:06 pm #519353 Denis Thank you Leo! I used this PHP code in the hook <?php if ( is_home() && ! is_front_page() ) { get_search_form(); } ?> BTW is it possible to call a hook from functions.php? I’d prefer to keep active DISALLOW_FILE_EDIT March 14, 2018 at 6:56 am #519609 LeoStaff Customer Support Yup: https://docs.generatepress.com/article/using-hooks/ March 15, 2018 at 1:40 am #520395 Denis That works! Thank you March 15, 2018 at 9:02 am #520790 LeoStaff Customer Support No problem! Author Posts Viewing 6 posts - 1 through 6 (of 6 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In