Sticked post (2 posts)

  1. Arxain
    Posted 6 years ago #

    Hi! I have only one sticked post, but my home page show 3 post. Even when i also condicioned the index.php to be showed only 2 post. a solution for it please.

  2. MichaelH
    Posted 6 years ago #

    Sticky posts don't get counted against the "posts per page" number.

    You would need to exclude stickies from being queried. Using the WordPress Default theme for example, in the wp-content/themes/default/index.php file, just before the line:
    <?php if (have_posts()) : ?>

    put this:

    <?php query_posts($query_string . '&caller_get_posts=1'); ?>

    The query_posts() article explains the arguments in detail.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.