So the other day I was losing my mind debugging this weird issue in WordPress. I had a plugin that made a custom block to display the latest posts. Simple enough, right? Well, nope. Every time I added the block, it would always show the same post at the top. No matter what I did, same post, first position, like it was glued there with superglue.
At first, I thought maybe the plugin was broken. Then I thought maybe my theme was doing something shady. Next thing I know, I’m deep-diving into every single query filter I could find—plugin files, theme files, everything. Hours of staring at code later, still no clue why the “chosen one” post kept popping up.
And then… it hit me. That post was marked as sticky. Sticky posts in WordPress always float to the top of queries unless you specifically tell WordPress to ignore them. So of course, every single block was just dragging that sticky post up like the teacher’s pet.
The fix? Easy once you know it. Either uncheck the “stick to the top” box in the post settings, or update the query in the plugin to add 'ignore_sticky_posts' => 1. Boom—problem solved.
Moral of the story: before you rip apart your whole codebase, always check if WordPress is just being WordPress.
