has anyone been able to use wpDataTables (wordpress plugin) and the PHP serialized array option to loop through posts?
Here is a basic WP_query I'm trying:
$plants = array();
$args = array(
'post_type' => 'post'
);
$the_query = new WP_Query( $args );
if ( $the_query->have_posts() ) :
while ( $the_query->have_posts() ) : $the_query->the_post();
$title = get_the_title();
$status = get_post_status();
$plants[] = array(
'title' => $title,
'status' => $status );
endwhile;
endif;
echo( serialize($plants) );
This outputs the required serialized array, but wpDataTables only shows a "No Data" column.
Any assistance would be appreciated.
Kind regards
Ryan