The GD > Listings block, widget and [gd_listings] shortcode can be filtered by author with the Filter by author setting (post_author). It takes one of these values:
current_user: listings added by the logged-in user. Visitors who are not logged in see no listings.current_author: listings by the author of the post or listing being viewed. On a normal WordPress page it shows no listings, so usecurrent_userthere instead.- A user ID, for example
post_author="11", for one particular user.
To show the logged-in user’s own places on a page:
[gd_listings post_type="gd_place" post_author="current_user" post_limit="10" with_pagination="1"]
On a UsersWP profile page, current_author shows the listings of the user whose profile it is.
If the filter seems to be ignored
- Check the quotes. Shortcodes copied from an email or a word processor often have curly quotes, which WordPress doesn’t read as quotes, so the value isn’t recognised. Retype them as straight quotes.
- Check you used
current_useron a normal page.current_authoronly works on posts and listings. - Test as the user in question. An admin viewing the page sees the admin’s own listings.
The shortcode shows 5 listings unless you set post_limit. To show a user’s favourites instead, use show_favorites_only="1" with favorites_by_user="current_user". The full option list is in GD > Listings.