I created few wysiwyg editors (5 to be exact) inside a page using ACF, and these custom wysiwyg editors only show up when I switch to a new page template call custom-page (switch using the page attributes from default WordPress).
Here is the problem, I just noticed that whenever I include a shortcode that involves creating a custom loop using wp_Query, it messes up the other wysiwyg editors by not showing in the front end.
In my 2nd wysiwyg editor I use a shortcode call [custom-slider], which will retrieve all my fields from a slider custom post type and display them into front end.
The slider and the shortcode works but the remaining contents from 3rd, 4th and 5th wysiwyg editors disappears on front end. If I call the shortcode in the 4th editors then only the 5th editor refuses to load (1-4 load perfectly).
I’ve tried switching from wysiwyg to text field and repeater as well but still doesn’t work.
I really need a workaround to this urgently as I’m rushing deadline for my client…. Thanks for any help in advance.
Here is the custom loop I’m using within my shortcode:
$temp = $wp_query;
'post_status' => 'publish',
'post_type' => 'new_slider',
'paged' => $paged,
'p' => 2 //only retrieve content from this post
$wp_query = new WP_Query($args);
while ($wp_query->have_posts()) : $wp_query->the_post();
$do_not_duplicate = $post->ID;
....loop content here
<?php endwhile; ?>
$wp_query = null; $wp_query = $temp;