Is there a bit of PHP I can use to grab the sticky blog post (there will only ever be one) to drop into my homepage template file?

  • What have you tried? Have you tried a custom WP_Query for sticky posts? Please edit your question to include your "homepage template", and whatever code you've tried. Nov 18, 2014 at 18:22

1 Answer 1


Straight out of the Codex:

$sticky = get_option( 'sticky_posts' );
$query = new WP_Query( 'p=' . $sticky[0] );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.