Paid Memberships Pro is built to restrict content on your site so only members can access protected content. You can customize the restriction settings for non-members in several ways. This recipe removes the restricted content message from the blog homepage. It is particularly useful for sites that show blog posts in a grid layout with a short (more...)
Paid Memberships Pro is built to restrict content on your site so only members can access protected content. You can customize the restriction settings for non-members in several ways.
This recipe removes the restricted content message from the blog homepage. It is particularly useful for sites that show blog posts in a grid layout with a short excerpt of each post. It cleans up the interface so your homepage stays welcoming and uncluttered for every visitor, member or not.

This recipe is for sites that display post excerpts or teasers in a grid or list on the blog homepage, the kind of layout where a restricted-content message under every protected post clutters the page. If your homepage already hides restricted posts from the listing, or does not show excerpts at all, you likely do not need this.
Keep in mind this recipe only hides the message. It does not change what a visitor can access. Members-only content stays fully protected on the single post page; this snippet only controls whether the explanatory message appears in the homepage grid.
Best Practices and ConsiderationsThe snippet checks both is_front_page() and is_home() because WordPress’s Settings > Reading page controls what counts as your “homepage.” is_front_page() is true on your homepage whether it is set to “Your latest posts” or a static page. is_home() is true specifically on the page showing your blog posts, which may or may not be the same page. Checking both means the snippet works no matter how your Reading settings are configured.
Because the filter runs before PMPro outputs the message, it hides the message for both logged-out visitors and logged-in non-members. Test both cases on your homepage to confirm the result looks right for each.
About the Code RecipeThis snippet targets and removes the message that normally alerts non-members about content restrictions and directs them to join or log in.
If a visitor is on the homepage, the code recipe clears the content of the no access message. On any other page, the default message keeps working as set up in your Paid Memberships Pro settings, so content restrictions are still communicated where they matter.
The is_front_page() and is_home() functions determine whether the current page is the site homepage. Depending on your WordPress settings and theme, these functions can return different results, so test the snippet on your own site to confirm it behaves as expected.
By adding this snippet, you keep the homepage clean while leaving restriction notices in place everywhere else. Potential members still learn about exclusive content without a restriction message greeting them the moment they land on your site.
Screenshots: Before and After
Before: the restricted access message shows in the post grid.
After: the snippet clears the message so the grid stays clean.The Code RecipeAdding the Recipe to Your WebsiteYou can add this recipe to your site by creating a custom plugin or using the Code Snippets plugin available for free in the WordPress repository. Read this companion article for step-by-step directions on either method.
How to Customize This Code Recipeis_front_page() || is_home() check on this line to include is_tag() or is_category().Author: Kim White
Kim White is a Technical Support Engineer here at PMPro. She has a great intuition for unraveling information and coming up with a solution. She’s been building and maintaining websites since 1998 and enjoys helping people make the most of their WordPress membership sites. Kim also organizes her local WordPress WordCamp and Meetup.
Have a question about how to use this feature? Our Support Page outlines three ways to get support.
Our Max plans include hands-on help customizing your membership site and implementing new features. Upgrade to PMPro Max now »
Was this article helpful?
YesNo
| # | Наименование новости | Тональность | Информативность | Дата публикации |
|---|---|---|---|---|
| 1 | Disable PMPro’s Redirect on the WordPress Registration Page | 0 | 11.99 | 07-10-2026 |
| 2 | Restrict your Membership Sites Mailing Locations by Specifying Valid Zip Codes | 0 | 5.2 | 02-10-2026 |
| 3 | Best Membership Plugin WordPress: Top Picks for 2024 | 0 | 5.15 | 09-08-2024 |
| 4 | Add Custom Colors to the Block Editor Color Palette | 0 | 7.18 | 15-10-2026 |
| 5 | Give Your Custom Post Types Their Own Memberlite Layout Settings | 0 | 8.1 | 15-10-2026 |
| 6 | Prevent Users From Using an Email Address as Their Username | 0 | 6.97 | 02-10-2026 |
| 7 | Hide the Discount Code Fields | 0 | 7.65 | 02-10-2026 |
| 8 | The Paid Newsletter Playbook: Content Strategy + Hybrid Setup with PMPro | 0 | 8.92 | 14-10-2026 |
| 9 | Best WordPress Membership Plugins in 2026: 4 Top Picks Compared | 0 | 14.85 | 04-06-2026 |