WP Data Tables PHP Array

Hi! I have installed WP Data Tables and am trying to get it to draw from a serialised php array. The code I am using to generate my array is copied from the WP Data Tables guidance, but something in X seems to be blocking it. Can you offer any advice?

Thanks in advance!

Alex

<?php // Initializing the WordPress engine in a standalone PHP file include('../../../wp-blog-header.php'); header("HTTP/1.1 200 OK"); // Forcing the 200 OK header as WP can return 404 otherwise // Preparing a WP_query $the_query = new WP_Query( array( 'post_type' => 'my_deals', // We only want deals 'post_count' => -1 // We do not want to limit the post count // We can define any additional arguments that we need - see Codex for the full list ) ); $return_array = array(); // Initializing the array that will be used for the table while( $the_query->have_posts() ){ // Fetch the post $the_query->the_post(); // Filling in the new array entry $return_array[] = array( 'Client' => get_permalink().'||'.get_field('client_text_name'), // Set the title 'Date completed' => get_field('date'), // Set the value 'Deal/Matter' => get_field('matter'), // Set the value 'Sector' => get_field('sector'), // Set the value 'Description' => get_field('description') // Get first 200 chars of the content and replace the shortcodes and tags ); } // Now the array is prepared, we just need to serialize and output it echo serialize( $return_array );

Hi Alex,

As far as I know xtheme does not block anything that could hinder functionality of other plugins.

It sounds like you might be having an issue with a third party plugin or script. Regretfully, we cannot provide support for third party plugins or scripts as our support policy in the sidebar states due to the fact that there is simply no way to account for all of the potential variables at play when using another developer’s plugin or script. Because of this, any questions you have regarding setup, integration, or troubleshooting any piece of functionality that is not native to X will need to be directed to the original developer.

Thank you for your understanding.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.