Home › Forums › Support › limiting 'after content' hook only to blog posts This topic has 5 replies, 2 voices, and was last updated 6 years, 3 months ago by Leo. Viewing 6 posts - 1 through 6 (of 6 total) Author Posts January 8, 2018 at 4:19 am #465677 Moses Hello I’m using this code snippet in the ‘after content’ hook to display Elementor templates (signup form and related posts) <?php if ( is_single() ) { echo do_shortcode('[elementor-template id="1287"]'); } ?> <?php if ( is_single() ) { echo do_shortcode('[elementor-template id="1281"]'); } ?> How can I limit them to appear only after blog posts? ATM they are showing at the bottom of single products too for example http://nadyalobak.com/product/חוברת-השראה-לדרך/ http://nadyalobak.com/2018/01/07/טיפים-לחורף-נעים-חמים-ויצירתי/ January 8, 2018 at 9:29 am #465971 LeoStaff Customer Support Hi there, Can you try excluding this? https://docs.woocommerce.com/document/conditional-tags/#section-7 January 8, 2018 at 10:35 am #466033 Moses Not really sure how to add an exclude rule to the code :/ but it seems like what should be done January 8, 2018 at 11:58 am #466086 LeoStaff Customer Support Try: <?php if ( is_single() && ! is_product() ) : ?> More info here if you are interested: https://docs.generatepress.com/article/using-hooks-conditional-tags/ January 8, 2018 at 10:52 pm #466363 Moses Leo the magician! Thanks it worked perfectly! January 9, 2018 at 6:35 am #466584 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