Home › Forums › Support › Conditionals inside hook This topic has 3 replies, 2 voices, and was last updated 6 years, 10 months ago by Tom. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts May 25, 2017 at 2:12 pm #324160 Jamal Hi Hope you can help me out a little here, i’m trying to show a cf7 form inside a hook on a specific category. The form shows but somehow i keep breaking the sidebar which goes below the post while on desktop. Thanks ! add_action ( 'generate_after_entry_content', 'sommar_bookings' ); function sommar_bookings() { if ( in_category( 'sommarlov-categ' ) ){ ?> <?php echo do_shortcode( '[contact-form-7 id="2857" title="Booking form"]' ); ?> <?php } } May 25, 2017 at 8:41 pm #324250 TomLead Developer Lead Developer Is there any HTML in your contact form? If so, you might have some elements no closed properly in there. May 26, 2017 at 12:44 am #324300 Jamal Thanks dude ! Spent hours trying to make this to work. May 26, 2017 at 12:45 am #324302 TomLead Developer Lead Developer No problem! 🙂 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