<?php
get_header();

$spicepay_shop_plugin_shortcodes = array( 'spicepay_products', 'spicepay_cart', 'spicepay_checkout', 'spicepay_complete' );

while ( have_posts() ) :
	the_post();

	$spicepay_shop_content        = get_the_content();
	$spicepay_shop_is_plugin_page = false;
	foreach ( $spicepay_shop_plugin_shortcodes as $spicepay_shop_shortcode ) {
		if ( has_shortcode( $spicepay_shop_content, $spicepay_shop_shortcode ) ) {
			$spicepay_shop_is_plugin_page = true;
			break;
		}
	}
	?>
	<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
		<?php if ( ! $spicepay_shop_is_plugin_page ) : ?>
			<header class="mb-10">
				<h1 class="text-3xl sm:text-4xl md:text-5xl"><?php the_title(); ?></h1>
			</header>
		<?php endif; ?>

		<div class="prose prose-lg max-w-none">
			<?php the_content(); ?>
		</div>
	</article>
	<?php
endwhile;

get_footer();
