We’ve wrote a lot of articles about Post Formats here at WP Speak. Here’s another one. Have you ever wondered how to exclude a post format from your homepage?
For some reasons, you might want to exclude a Post Format from your homepage. For example, you might want to exclude Link Post Format from your homepage since it might be less important to your readers or you want to avoid your homepage to be spammy with posts with Link Post Format since you update it too often.
Simply put the following code in functions.php
file of your theme:
Huge thanks to Bill Ericsson for this WordPress snippet. The code will exclude Link Post Format from your homepage. You may want to change or add other Post Formats too – aside, gallery, image, quote, status, video, audio, chat.
Want to see it in action? Take a look at Post Status new site redesign. In this new design, they decided to hide the Link posts from the main homepage column. Since they often publish link posts, this will avoid the main homepage column looks too spammy, while at the same time lets them showcase long-form contents (standard post format) for longer periods. Instead, they placed the link posts in the sidebar. What a brilliant idea.
Leave a Reply