2 hours ago · Tech · hide · 0 comments

I finally got around to re-customizing the related posts on my blog. Specifically: hiding related posts on asides and links. They’re short. A set of related thumbnails can be as long as (or longer than) the actual post. Years ago I had this set up when the site was running WordPress and Jetpack. I’ve since moved it to Contextual Related Posts (in order to keep it local on my server), and later to ClassicPress. Neither plugin has features to skip based on post formats, but you can use hooks, actions and filters to write your own. Contextual Related Posts The plugin has options to exclude displaying by post type (post, page, or media), by category, or on individual post IDs…but not by tag or post format. So I dug around in the docs a bit, looking for ways to filter CRP’s input or output. The simplest approach I came up with was to turn off automatically adding it to any page/feed/archive type in the CRP plugin’s general tab, then manually add it to the post’s output when and only when I…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.