编辑文件:full-width.php
<?php /** * Template Name: Full Width (no sidebar) * * A generic full-width page template — assign it to any page that should render * edge-to-edge (e.g. a landing page built from shortcodes/blocks). Unlike the * Who We Are / FAQ / Inquiry templates, this one renders the page's DB content * (the Loop), not a hardcoded layout. * * @package ClothB2B_Child */ if ( ! defined( 'ABSPATH' ) ) { exit; } get_header(); ?> <main id="primary" class="site-main"> <?php while ( have_posts() ) : the_post(); ?> <article id="post-<?php the_ID(); ?>" <?php post_class( 'cb-full-width' ); ?>> <?php if ( ! is_front_page() ) : ?> <header class="cb-page-banner"> <div class="cb-container"> <h1 class="cb-page-banner__title"><?php the_title(); ?></h1> </div> </header> <?php endif; ?> <div class="cb-container"> <div class="entry-content"> <?php the_content(); wp_link_pages( array( 'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'clothb2b' ), 'after' => '</div>', ) ); ?> </div> </div> </article> <?php endwhile; ?> </main><!-- #primary --> <?php get_footer();
保存
返回