簡體   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