【问题标题】:Page.php not showing changes in wordpressPage.php 未显示 wordpress 中的更改
【发布时间】:2014-07-28 20:45:51
【问题描述】:

所以,我正在使用 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(); ?>

【问题讨论】:

  • 您是否需要显示页面内容或帖子您是否安装了任何缓存插件。您是否刷新了它们和您的浏览器缓存。你得到什么调试信息

标签: php html css wordpress templates


【解决方案1】:

我认为您需要关闭 WP 循环:

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

参考:http://codex.wordpress.org/The_Loop

【讨论】:

  • 感谢您的回复。我按照你说的做了,但是没有用。感谢您的宝贵时间。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2020-07-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多