php - Page.php 不显示 wordpress 中的更改

标签 php html css wordpress templates

因此,我正在使用 Html5blank 在 wordpress 中重新创建一个 html 模板。我对页眉和页脚没有任何问题,它们都很完美。我遇到的问题是让我的 page.php 显示我对它所做的更改,奇怪的是它似乎也不符合我的 css 样式。任何帮助都将不胜感激。谢谢!

ETA:我研究了这个网站很长一段时间,虽然有几个问题有些相似,但我没有发现任何问题是我的确切问题。我不确定为什么我被否决了,但我想我应该提到我确实四处寻找这个答案。似乎没有人有这个确切的问题,如果他们有类似的问题,他们的解决方案根本没有帮助我。

这是我的 page.php 的代码

<?php get_header(); ?>
  <!-- MAIN CONTENT -->
    <div id="outermain">
        <div class="container">
            <div class="row">

                <section id="maincontent" class="twelve columns">
                    <div class="main">

                        <section class="content">

                            <article class="post">
                                <div class="postimg">
                                    <div align="center">
                                    </div>
                                </div>

                                <div class="entry-date">
                                    <div class="postdate">02</div>
                                    <div class="posttime">September</div>
                                </div>

                                <div class="entry-text">
                                   <h2 class="posttitle">
<a href="single.html">Phasellus tempus mauris quis dui lobortis.</a></h2>

<?php if (have_posts()): while (have_posts()) : the_post(); ?>
                                    <div class="entry-content">
                                    <?php article id="post-<?php the_ID(); ?>" 
<?php post_class(); ?>>

            <?php the_content(); ?>

                                    </div>
                                </div>
                                <div class="clear"></div>
                                <?php edit_post_link(); ?>
                            </article>

    <?php endif; ?>


                        </section>

                    </div>
                </section>


            </div>
        </div>
    </div>
    <!-- END MAIN CONTENT -->
    <div id="shadowbottom"></div>


<?php get_footer(); ?>

最佳答案

我认为您需要通过以下方式关闭您的 WP Loop:

<?php endwhile; else: ?>
<p>Roops, no content here.</p>
<?php endif; ?>

引用:http://codex.wordpress.org/The_Loop

关于php - Page.php 不显示 wordpress 中的更改,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25004045/

相关文章:

javascript - 输入超过999时JS数字范围错误

html - 内容位于固定顶部导航栏下方

html - 防止文本输入的水平 "scrolling"?

php - 为什么在 yii2 分页中克隆对象

javascript - SyntaxError : expected expression, 在使用 jquery 提交表单时得到 ')'

javascript - 如何获取和设置 SVG 中 <text> 元素的值?

css - css中使用选择器过滤掉某些元素

css - 如何在中途反转循环?

php - 将 '$_GET' 十六进制值(字符串形式)转换为十六进制 int ——如何?

php - 如何使用图形 API 删除连接到我的 Facebook 页面的人