Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • This is great thanks! One question (I'm a little new to php). How do I redirect to a custom login page vs the wp login page? I think wp_login_url() is sending me to the wp login page. How do I send them to gymkoi.com/login? Thanks so much! Commented May 21, 2020 at 19:18
  • That's correct - just replace wp_login_url() with '/' in quotes. Commented May 21, 2020 at 19:44
  • 1
    Better yet, add a login form right inside the single-listing.php for when a user is not logged in. <?php wp_login_form(); ?> - developer.wordpress.org/reference/functions/wp_login_form Commented May 21, 2020 at 19:45
  • thank you very much for the help, will test these out. Commented May 21, 2020 at 21:47