php 【WordPress的index.php的】

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 【WordPress的index.php的】相关的知识,希望对你有一定的参考价值。

<?php get_header(); ?>

    <main>

        <?php if ( have_posts() ): while ( have_posts() ): the_post(); ?>

            <article <?php post_class(); ?>>
                <?php if ( has_post_thumbnail() ): ?>
                    <figure><?php the_post_thumbnail(); ?></figure>
                <?php endif; ?>
                <h1><?php the_title(); ?></h1>
                <?php the_content(); ?>
            </article>

        <?php endwhile; endif; ?>

    </main>

<?php get_sidebar(); ?>

<?php get_footer(); ?>

以上是关于php 【WordPress的index.php的】的主要内容,如果未能解决你的问题,请参考以下文章

在XAMPP创建的网站根目录里面有index.php,要复制过去的wordpress里也有index.php,内容不一样,留哪个

Wordpress 不使用 home.php 而是使用 index.php 作为帖子页面。

阻止 WordPress 从 301 重定向 /index.php 到 /

Wordpress没有使用home.php而是使用index.php作为帖子页面。

使用虚拟主机时删除 Wordpress 子文件夹中的 index.php

<img src=...> 在 WordPress header.php 和 index.php 中不显示本地图像