简体   繁体   中英

Sticky page not working in wordpress

Why id the Sticky post functionality is not working? I quick edit the posts to sticky on the blog they reside on so it will show at the top of the main blog home page, but nothing happens.

This site uses a plugin called "AHP Sitewide Recent Posts for WordPress" in order to combine all the sites individual blogs on one page.

I have looked at the code and cant figure out what is preventing the sticky from working. i have tried pretty much everything i know. Please help, my .php knowledge is basic. This is the code that displays the Main Blog.

    <?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(); ?>

The ahp_recent_posts() function is probably override the default Loop functionality. Hard to say without seeing its contents, but try commenting it out and see what the display looks like.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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