Search for: Log In Free Support [Support request] Hooking custom content after the comments section Home › Forums › Support › Hooking custom content after the comments section This topic has 3 replies, 2 voices, and was last updated 3 years, 9 months ago by Tom. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts April 12, 2017 at 9:06 am #304997 Joona GeneratePress doesn’t seem to have a custom hook after the comments field. Is there a general WordPress hook I could use, and if so, how? I need to insert a YouTube video after the comments field on single blog posts. GeneratePress 1.3.46GP Premium 1.2.96 April 12, 2017 at 10:41 am #305067 TomLead Developer Lead Developer You should be able to use this hook: https://docs.generatepress.com/article/generate_after_main_content/ Let me know if you need help with the function/conditional 🙂 Documentation: http://docs.generatepress.com/ Adding CSS: http://docs.generatepress.com/article/adding-css/ Ongoing Development: https://generatepress.com/ongoing-development April 13, 2017 at 1:30 pm #305606 Joona I was able to insert the code to the right place, but I still need to make it conditional so that the code is shown only on single posts. April 13, 2017 at 8:01 pm #305703 TomLead Developer Lead Developer Something like this should do it: add_action( 'generate_after_main_content','tu_after_main_content' ); function tu_after_main_content() { if ( ! is_single() ) { ?> Your Youtube video here <?php } } Adding PHP: https://docs.generatepress.com/article/adding-php/ Documentation: http://docs.generatepress.com/ Adding CSS: http://docs.generatepress.com/article/adding-css/ Ongoing Development: https://generatepress.com/ongoing-development Author Posts Viewing 4 posts - 1 through 4 (of 4 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In