diff options
Diffstat (limited to 'includes/giglogadmin-shortcodes.php')
-rw-r--r-- | includes/giglogadmin-shortcodes.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/includes/giglogadmin-shortcodes.php b/includes/giglogadmin-shortcodes.php index 5070a3e..69f46c4 100644 --- a/includes/giglogadmin-shortcodes.php +++ b/includes/giglogadmin-shortcodes.php @@ -22,8 +22,16 @@ if ( ! function_exists( 'giglogadmin_shortcode_public' ) ) { * This shortcode does not have any attributes. */ function giglogadmin_shortcode_public() : string { - $c = new GiglogAdmin_ConcertsTable(); - return $c->render(); + $opts = array( + 'offset' => 0, + 'recperpage' => 15, + ); + $concerts = GiglogAdmin_Concert::find_concerts( $opts ); + + ob_start(); + include __DIR__ . '/templates/giglogadmin-concerts-table.php'; + + return ob_get_clean(); } add_shortcode( 'getconcerts', 'giglogadmin_shortcode_public' ); |