I am trying to make a basic page with visual composert adding one row and a text block where I paste in en mailchimp form embed code. When saved and previewed the signup form shows twice. When going back to the editor there is nowehere any sign of the row/elemt/form being showed twice.
If you are using the Kalium Theme
|||||Note - This issue arise only if you have selected the default template and kept show header option on
then you can fix the issue by commenting out the
the_content(); // around line 42 in main theme of kalium/page.php
or
comment out the
echo apply_filters(‘the_content’, laborator_esc_script($the_description)); // line 56 of kalium/tpls/page-heading-title.php
This is because,
if you enable default theme with show header page setting, page.php is enabled which calls kalium/tpls/page-heading-title.php template and both are echoing the_content onto the page, which cause the vc_ block to be executed twice.
There is one setting that will prevent this without fiddling with the code. under page options>Heading Title>Page Heading Description Type change the option to custom header and leave the following header blank . It wasn’t a bug but a feature just had to go to the code level to understand that … If you are not using the same theme. I can debug the issue for you.
It turned out that in my present theme Twenty Seventeen there is a setting for the hompeage where you can have up to 5 different “boxes” or rows to show content. I had put some code in the second one and when I deleted this the problem was gone. So noting to do with VC in this case for me.
Thank you guys, this topic helped me to solve a very similar issue. I had to comment out the following line in theme’s functions.php: $description = strip_tags(apply_filters('the_excerpt', get_post_field('post_excerpt', $id)));
“the_excerpt” was rendering my shortcode second time after the_content()