• Resolved cihomewood

    (@cihomewood)


    Hi

    I would like to hide specific posts on my bews page from logged out users. At the moment all I can do is cause the post title to show ‘Restricted Access’.

    Am I missing something or is there no way to completely hide a restricted post?

    Thanks

    Ian

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @cihomewood

    You can hide posts by Category/Taxonomy and return the 404 page when restricted users are trying to access those posts under the restricted category/taxonomy. Please check https://docs.ultimatemember.com/article/1620-restriction-content

    Regards,

    • This reply was modified 2 years, 10 months ago by Champ Camba.
    Thread Starter cihomewood

    (@cihomewood)

    Thanks for the information, but unfortunately that does exactly the same thing. For logged in users the post is shown properly, with the correct title. For logged out users, the post still shows in the blog but with the title ‘Restricted Access’.

    I don’t want it to show in the blog at all, for logged out users. I don’t want them to see that there is a post there with restricted access.

    Ian

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @cihomewood

    Please try adding the following code snippet to your theme/child-theme’s functions.php file or use the Code Snippet plugin to run the code:

    add_filter("um_ignore_restricted_title","__return_true");

    Regards,

    Thread Starter cihomewood

    (@cihomewood)

    Thanks. That seems to ignore the restriction rather than the post, so it becomes totally visible.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Thanks for letting us know.

    Regards,

    Just as OP said, adding the code in functions.php will reveal the title instead of showing “Restricted content” or hiding completely if the user is not logged in. Is there any way to hide the post completely for certain categories if the user is not logged in, i.e., not showing the post nor its title completely?

    • This reply was modified 2 years, 7 months ago by Ivangelion.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Hide posts in blog for logged out users’ is closed to new replies.