带有query_post的怪问题

问题描述

| 我一直在尝试使用查询帖子将H5和H6标签放置到最近的帖子中,但是 WordPress不想正确应用它们。似乎仅将它们应用于第一个结果,而在其余情况下,它仅丢弃列表的第二项。 我将粘贴sidebar.php和style.css的某些行。非常感谢您的帮助。我已经摆弄了三个小时,没有运气。 www.estamosobservando.com sidebar.php
 <div id=\"widget\"> 

        <h3>Latest posts</h3>   

                <?php query_posts(\'posts_per_page=3\'); if (have_posts()) : while (have_posts()) : the_post();?>

                <ul>

                <li><h5><a href=\"<?php the_permalink(); ?>\"><?php the_title(); ?></a></h5></li>
                <li><h6><?php the_date(); ?></h6></li>             

                </ul>

                <?php endwhile; endif; ?>  
style.css
#widget { padding: 133px 0px 0px 20px; text-align:left; }

#widget ul {margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px; list-style-type:none; list-style-image: none; text-decoration: none;}

#widget li { margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px; list-style-type:none; list-style-image: none; text-decoration: none; }
    

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)