繁体   English   中英

粘性页面在Wordpress中不起作用

[英]Sticky page not working in wordpress

为什么id即时贴功能不起作用? 我快速编辑帖子以使其停留在它们所驻留的博客上,这样它将显示在博客主主页的顶部,但是什么也没有发生。

该网站使用名为“ AHP WordPress的AHP网站范围内的最新帖子”的插件,以便将所有网站的单个博客合并到一个页面上。

我看了看代码,无法弄清楚是什么阻止了粘滞工作。 我已经尝试了几乎所有我知道的东西。 请帮助,我的.php知识是基础。 这是显示主博客的代码。

    <?php
/**
 * @package WordPress
 * @subpackage EHC_Theme
 */


/*
Template Name: 3-Column
*/

         get_header(); ?>

    <?php include(TEMPLATEPATH . "/sidebarHome.php"); ?>

    <div id="content" class="narrowcolumn" role="main">
    <h3>Recent Posts</h3>


    <?php ahp_recent_posts(10, 300, 127, 150, 4, '<div class="post">', '</div>', 1); ?>


    <?php if (have_posts()) : ?>

        <?php the_post();  the_content(); ?>
         <!--<?php while (have_posts()) : the_post(); ?>

            <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
            <?php echo get_blog_avatar(1,'32','mystery'); ?>
                <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
                <p class="postmetadata"><small><?php the_date() ?>, <?php the_time() ?>  By <?php the_author() ?></small></p>

                <div class="entry">
                    <?php the_excerpt('Read the rest of this entry &raquo;'); ?>
                </div>

                <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments &#187;', '1 Comment &#187;', '% Comments &#187;'); ?></p>
            </div>

        <?php endwhile; ?>

        -->
                <div class="navigation">
            <div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?>Next</div>
            <div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?>Prev</div>
        </div>



       <?php else : ?>

        <h2 class="center">Not Found</h2>
        <p class="center">Sorry, but you are looking for something that isn't here.</p>
        <?php get_search_form(); ?>

    <?php endif; ?>

           </div>

<div>
<?php get_sidebar(); ?>
</div>
<?php get_footer(); ?>

ahp_recent_posts()函数可能会覆盖默认的Loop功能。 很难看到它的内容,但是要尝试将其注释掉,然后查看显示效果。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM