I've added a shortcode [form] inside my wysiwyg the 2 paragraphes before the shortcode.
<p>test 1</p>
<p>test2</p>
[form]
but on the frontend, the shortcode is showing at the top of the content. I thought it was an error in CSS, but the HTML is indead rendering the form, and then my paragraph.
Any idea? I'm on WP 5.4
EDIT :
This is how the shortcode is created :
/* SHORTCODE */
function form_shortcode() {
include( "includes/form.php" );
return;
}
add_shortcode( 'form_calcul', 'form_shortcode' );
I have a few lines of php inside. I should probably precise, I'm in a plugin. I tried also this, but no success:
ob_start();
get_template_part('form');
return ob_get_clean();