[Resolved] Conditionals inside hook

Home Forums Support [Resolved] Conditionals inside hook

Home Forums Support Conditionals inside hook

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #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 }
    }
    #324250
    Tom
    Lead Developer
    Lead Developer

    Is there any HTML in your contact form? If so, you might have some elements no closed properly in there.

    #324300
    Jamal

    Thanks dude ! Spent hours trying to make this to work.

    #324302
    Tom
    Lead Developer
    Lead Developer

    No problem! 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.