prefix . 'peptide_news_articles'; $page = isset( $_GET['paged'] ) ? max( 1, absint( $_GET['paged'] ) ) : 1; $per_page = 25; $offset = ( $page - 1 ) * $per_page; // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching $total = (int) $wpdb->get_var( "SELECT COUNT(*) FROM {$table}" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching $articles = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$table} ORDER BY published_at DESC LIMIT %d OFFSET %d", $per_page, $offset ) ); $total_pages = ceil( $total / $per_page ); ?>

()

ID
id ); ?> title, 12 ) ); ?> source ); ?> tags ) ) : ?> tags, 10 ) ); ?> ai_summary ) ) : ?> ai_summary, 15 ) ); ?> published_at ) ) ); ?> fetched_at ) ) ); ?> is_active ? '✓' : '✗'; ?>
1 ) : ?>
add_query_arg( 'paged', '%#%' ), 'format' => '', 'current' => $page, 'total' => $total_pages, ) ); ?>