Support » Fixing WordPress » Sticky only on frontpage

  • Resolved Patrick_O


    In my blog it shows both on top of the first page and on the position it normally shoud be. But the goal of a sticky post – I think – is to substract it from the normal timeline and put in on top of the first page of posts.

    In order to correct this – and keep the pagination correct – I want to create a my_query that checks if there is a sticky and makes a loop accordingly.

    This code tells me if the particular post is a sticky. Or if no parameters ar given, it tells me if the current posts to be displayed is a sticky one (inside the loop):
    <?php is_sticky($post_ID); ?>

    What I need however, is a function or a variable that tells me if there are sticky posts at all in the entire wordpress blog.

    So my question is: “Is there a variable or function that tells me if there are ANY sticky posts in wordpress?


    Do you have a better suggestion for me?

    Thanks in advance!

  • The topic ‘Sticky only on frontpage’ is closed to new replies.