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.
Do You Need This Recipe?
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 Considerations
The 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 Recipe
This 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


The Code Recipe
Adding the Recipe to Your Website
You 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 Recipe
- Cover tag or category archives (line 18): If your theme also displays posts in a grid on tag or category archives, extend the
is_front_page() || is_home()check on this line to includeis_tag()oris_category().
Get Support From Our Team of Experts
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 »


