WordPress -posted_on 不显示 (PHP) [英] WordPress - posted_on not displaying (PHP)
问题描述
我一直在研究 WP 主题(基于 2011)有一段时间了,该主题具有用于置顶帖子的聚光灯(特色)区域:http://www.designated.net.au/testbed/wordpress/
I have been working on a WP theme (based on twentyeleven) for a while that has a spotlight (featured) area for sticky posts: http://www.designated.net.au/testbed/wordpress/
我遇到的问题是posted_on 声明没有为置顶帖显示.说到 PHP,我完全是个菜鸟,所以我真的不知道自己在做什么.
The problem I am having is that the posted_on declaration does not display for the sticky post. I am a total noob when it comes to PHP so I don't really know what I'm doing.
为了突出我使用本指南的粘性帖子:http://line25.com/tutorials/how-to-create-a-featured-post-layout-in-wordpress
To feature the sticky posts I used this guide: http://line25.com/tutorials/how-to-create-a-featured-post-layout-in-wordpress
但我更改了帖子的显示以使用 content.php 中的代码.所以我使用以下内容:
But I changed the display of the post to use the code from content.php. So I am using the following:
<?php if ( 'post' == get_post_type() ) : ?>
<div class="entry-meta">
<?php twentyeleven_posted_on(); ?>
</div><!-- .entry-meta -->
<?php endif; ?>
那是不显示的部分.
如果您需要,我很乐意提供更多代码.
I'm happy to supply more code if you need me to.
推荐答案
我想通了.这是 CSS 的问题.出于某种原因,它被设置为绝对值,左上角为零.
I figured it out. It was a problem with the CSS. For some reason it was set to absolute with zero left and top.
这篇关于WordPress -posted_on 不显示 (PHP)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!