How to load shortcode in search not found?

Home Forums Gillion Theme How to load shortcode in search not found?

Home Forums Gillion Theme How to load shortcode in search not found?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • borishar
    Participant

    I have this code from content-none:

    <?php if ( is_home() && current_user_can( ‘publish_posts’ ) ) : ?>
    <?php printf( wp_kses( __( ‘Ready to publish your first post? Get started here.’, ‘gillion’ ), gillion_allowed_html(>
    <?php elseif ( is_search() ) : ?>
    <?php esc_html_e( ‘Nothing found’, ‘gillion’ ); ?>
    <?php else : ?>
    <?php esc_html_e( ‘It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.’, ‘gillion’ ); ?>
    <?php endif; ?>

    but  I want to post a short code do_shortcode(‘[wpforms id="329"]

    When I did that, it shows the form code as text and doesn’t run the PHP. Can someone tell me the proper way to change “Nothing found” text into the shortcode?

    Shufflehound
    Moderator

    Hi there,

     

    Sure you need to add it like this:

    <?php echo do_shortcode('[wpforms id="329"]'); ?>

     

    Let us know if that works! 🙂

     

    Best regards,

    Shufflehound team

    • This reply was modified 1 year, 2 months ago by Shufflehound.
    • This reply was modified 1 year, 2 months ago by Shufflehound.
Viewing 2 posts - 1 through 2 (of 2 total)