【发布时间】:2018-10-01 14:16:33
【问题描述】:
我在弄清楚如何在所有主要内容(包括侧边栏)上方显示我的 wordpress 页面标题时遇到问题。换句话说,直接在标题之后。全宽页面很好,但在具有左对齐侧边栏的页面上,页面标题位于侧边栏内容的右侧和主要内容部分上方,而不是在页面的最顶部,直接在左对齐上方侧边栏内容。我正在使用 JointsWP 主题并查看了 loop-page.php 似乎页面标题在条目内容上方被调用:
<article id="post-<?php the_ID(); ?>" <?php post_class(''); ?> role="article" itemscope itemtype="http://schema.org/WebPage">
<header class="article-header">
<h1 class="page-title"><?php the_title(); ?></h1>
</header> <!-- end article header -->
<section class="entry-content" itemprop="articleBody">
<?php the_content(); ?>
</section> <!-- end article section -->
<footer class="article-footer">
<?php wp_link_pages(); ?>
</footer> <!-- end article footer -->
<?php comments_template(); ?>
</article>
如果我从 loop-page.php 中删除文章标题部分,并在 get_header() 关闭后将其直接插入 page.php;标记然后我得到所需的结果,但我认为这不是处理它的正确方法。对不起,如果这是一个非常基本的问题,但我已经在网上搜索并且无法找到答案。
【问题讨论】:
标签: wordpress