Okay
  Public Ticket #929278
Using shortcodes inside a Custom Split Block
Closed

Comments

  •  2
    Yiannis started the conversation

    Hello,

    I want to add the shortcode produced by ContactForm7 inside a Custom Split Block, so that I can have a contact form directly from my Home page, that is using a the "Composer page" template. And it doesn't seem to render. When I load the page I see the shortcode, not the actual form.

    Is there any way to go about this?

    Thanks!

  •  234
    Elena replied

    Hi,

    First of all install and activate the child theme. Then, copy the file template-composer.php from the parent theme and paste it into the child directory. Now open the copied file, find the string <?php echo wpautop( $block_content ); ?> on line 101 and replace it with <?php echo wpautop( do_shortcode($block_content) ); ?>.

    Repeat that on all <?php echo wpautop( $block_content ); ?> occurences into the file.

  •  2
    Yiannis replied

    Hi Pasquale thank you very much for your prompt reply!

    I will try this and let you know.

    I have one more question. Sorry for posting it here, but I tried to create a new ticket but it would not accept my purchase code (strange...):

    Can I keep the frame layout in mobile?

    When the site is viewed via a smartphone, although the "Framed layout" (through customize > Layout settings) is selected, the site appears in wide layout because of the responsive settings (if I am not mistaken this happens in screen resolutions lower than 768 px wide). Is there any way to disable this behaviour and keep the framed layout no matter what width the screen is?


    Thanks!

    Yiannis



  •  234
    Elena replied

    Yes, that's definitely possible but a little bit tricky. I recommend to inspect the parent theme's style.css file and override the rules you want to change in your child's style.css.

    Unfortunately we are unable to provide support on customisations, I am sorry, but I am sure that you'll be able to easily get it!