• Hi,

    My site is only accessible for logged in users.
    Posts are still visible when using loops to show some posts.

    When I restrict a single post for logged out users, they still visible when using loops, and only the image is hidden.
    When I select Replace the restricted Post Title. Then also the title is hidden.
    How can I also hide the read more button and date? Shouldn’t the posts be completely hidden

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Aswin Giri

    (@aswingiri)

    Hello @atelier64

    please check the checkbox for “Would you like to display 404 page when users haven’t access? ” to hide restricted posts from the query. Please check this screenshot.

    Thread Starter atelier64

    (@atelier64)

    Thank you for your message.

    This has not worked.
    I get the same result with these settings.

    See screenshot.
    https://prnt.sc/4p96KTwV-gkx

    These are my global settings:
    https://prnt.sc/coxuXOTnHQPl
    When I select “Replace the restricted Post Title”, then the title is also hidden.

    These are my posts settings.
    https://prnt.sc/NRJ-A8OkT2EA

    I’ve done more tests.
    When I have a page for the posts (Settings > Reading > Posts page: News)
    On that page the posts are hidden completely.

    When I use the blog element from the WPBakery Page Builder, then this problem occurs.

    • This reply was modified 2 years, 5 months ago by atelier64.
    Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Hi @atelier64

    Sorry for the late reply.

    Are you using WP Bakery to loop the posts? If so, you will need to customize it as UM only restricts the default Posts/Archive pages.

    Thread Starter atelier64

    (@atelier64)

    Yes, I use the WPBakery builder.
    In the builder there is an element to loop posts.
    My theme has a content-post.php file.

    That file has these code:
    if ( $query->have_posts() ){
    while ( $query->have_posts() ){
    $query->the_post();
    }
    }

    And for example the “read more button” code is this:
    $output .= ‘Read more‘;

    When I change “Read more” to “Read” in the php code. Then it’s also changed in the looped posts that is used with WPBakery Builder.

    So, yes I think I have to customize it.
    Can you point me in the right direction how I can customize this? Can I change something in the php file? Or,…

    “Is it possible that this worked last year?” Is there something changed in an update?

    • This reply was modified 2 years, 4 months ago by atelier64.
    Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Hi @atelier64

    Sorry for the late response. Is the posts a custom post type?

    Thread Starter atelier64

    (@atelier64)

    Hi,

    The standard posts from WordPress.
    https://prnt.sc/eg37aRywzQw_

    Thread Starter atelier64

    (@atelier64)

    Any news about this problem?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Hide posts from query when restricted’ is closed to new replies.