WordPress.org

Forums

WP-Members
[resolved] How to block search engine results for non registered users? (3 posts)

  1. abn89
    Member
    Posted 1 year ago #

    Hello,
    I need to block search engine results, offer details and single listings for non registered users...Can WP members work for this aim?I tried to install and use WP members, but it can block only pages or post..
    This is the website http://www.carplanning.it/noleggio-a-lungo-termine/ then click on HOME, the search engine is on the left. I need to block search engine results. Then, in the home page I also need to block "Leggi di piĆ¹" button for each car offer.
    Thank you
    Claudia

    http://wordpress.org/plugins/wp-members/

  2. Chad Butler
    Member
    Plugin Author

    Posted 1 year ago #

    You would probably need to customize your template that is used for search results. Where the loop is displayed, you could create a condition for user login:

    <?php
    
    if( is_user_logged_in() ) {
    
         // user is logged in - normal Loop code here
    
    } else {
    
         // user is not logged in, display message or you could
         // you could display the wp-members login like this:
    
         echo do_shortcode('[wp-members page="login"]');
    
    } ?>
  3. abn89
    Member
    Posted 1 year ago #

    Resolved!!!!
    Thank you so much :-))))

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP-Members
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.