wordpress dome.php
时间 : 2023-12-27 23:20:03声明: : 文章内容来自网络,不保证准确性,请自行甄别信息有效性

最佳答案

<?php

/*

Template Name: Dome Template

*/

get_header(); ?>

<main id="primary" class="site-main">

<?php

// Start the loop.

while ( have_posts() ) :

the_post();

// Include the Dome content template.

get_template_part( 'template-parts/content', 'dome' );

// If comments are open or we have at least one comment, load up the comment template.

if ( comments_open() || get_comments_number() ) :

comments_template();

endif;

// End the loop.

endwhile;

?>

</main>

<?php get_footer(); ?>

其他答案

<?php

/**

* Template Name: Dome Template

* Description: A custom template for Dome page.

*

* @package WordPress

* @subpackage TwentyTwentyOne

* @since TwentyTwentyOne 1.0

*/

// Get the header template

get_header();

// Start the loop

while (have_posts()) : the_post(); ?>

<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">

<header class="entry-header">

<h1 class="entry-title"><?php the_title(); ?></h1>

</header>

<div class="entry-content">

<?php

the_content();

wp_link_pages(array(

'before' => '<div class="page-links">' . __('Pages:', 'twentytwentyone'),

'after' => '</div>',

));

?>

</div><!-- .entry-content -->

</article><!-- #post-<?php the_ID(); ?> -->

<?php endwhile; ?>

<?php

// Get the footer template

get_footer();

?>