0

I know that posts that are sticky show on top but I want to add an image to show that is featured is there any code I could use

3
  • 1
    What have you coded so far? Please post the code you have tried as an EDIT to your question. Commented Feb 9, 2015 at 13:29
  • I don't have a code I'm wondering if there is one Commented Feb 9, 2015 at 13:50
  • You need to provide the code you have tried rather than expect volunteers to do your work for you for free. Commented Feb 9, 2015 at 14:54

1 Answer 1

1

You can use the conditional tag, is_sticky() to check whether or not a specific post is a sticky post or not.

You can try the following inside your loop

if( is_sticky() ) {

    //Display your desired image

}

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.