Hi,
I have an odd malfunction that I wonder if you might be able to help with.
I have a custom post type (named ‘tables’) containing a single post that has a few rows of content (using the Grid Row component).
My shortcode queries the custom post by type and seeks to insert the content of the post into a page.
However, it currently only places the first row into the correct place in the DOM, with the remaining rows being placed outside the main wrapper div (#wrap_all).
My shortcode is as follows:
function test_pull(){
ob_start();
$args = array(
'post_type' => 'tables'
);
$category_posts = new WP_Query($args);
if($category_posts->have_posts()) : while($category_posts->have_posts()) : $category_posts->the_post();
global $post;
the_content();
endwhile; endif; wp_reset_query();
$output = ob_get_clean();
return $output;
}
add_shortcode('test-pull', 'test_pull');
Any help would be very much appreciated!
Cheers,
Ash
Hi Ash,
Could you please provide us with a temporary admin login so that we can take a closer look? You can post the details in the Private Content section of your reply.
Best regards,
Rikard
I’ll need to unlock your IP so you can view (it’s on a dev server at the moment. Can you send it to me and I’ll fire you across a log in. Thanks :)