Where to get the table id for the shortcode?
-
Hi,
I’m trying to post the tables as posts.<?php $args = array( 'posts_per_page' => 6, 'orderby' => 'post_date', 'order' => 'DESC', 'post_type' => 'tablepress_table', 'post_status' => 'publish', 'paged' => $paged, 'suppress_filters' => true ); $pageposts =''; $pageposts = new WP_Query( $args ); ?>
Here I setup the loop, and I get the “table posts” with that.
But of course, they are not formatted and stuff.
Now I tried to insert
<?php echo do_shortcode( '[table id="'.$thePostID.'"]' ) ?>
But the post ID =/= the table ID.
Is there a way to get the ID of the table for the shortcode? Or is there another better alternative?Best Wishes
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Where to get the table id for the shortcode?’ is closed to new replies.