{"id":2498,"date":"2026-10-20T08:34:09","date_gmt":"2026-10-20T07:34:09","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/gd-listings-filter-by-author\/"},"modified":"2026-10-20T08:39:19","modified_gmt":"2026-10-20T07:39:19","slug":"gd-listings-filter-by-author","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/core-widgets\/gd-listings-filter-by-author\/","title":{"rendered":"How to show only the current user&#8217;s listings with GD Listings"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The GD &gt; Listings block, widget and <code>&#091;gd_listings&#093;<\/code> shortcode can be filtered by author with the Filter by author setting (<code>post_author<\/code>). It takes one of these values:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>current_user<\/code>: listings added by the logged-in user. Visitors who are not logged in see no listings.<\/li>\n\n\n\n<li><code>current_author<\/code>: listings by the author of the post or listing being viewed. On a normal WordPress page it shows no listings, so use <code>current_user<\/code> there instead.<\/li>\n\n\n\n<li>A user ID, for example <code>post_author=&quot;11&quot;<\/code>, for one particular user.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">To show the logged-in user&#8217;s own places on a page:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-html\">&#091;gd_listings post_type=&quot;gd_place&quot; post_author=&quot;current_user&quot; post_limit=&quot;10&quot; with_pagination=&quot;1&quot;&#093;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">On a UsersWP profile page, <code>current_author<\/code> shows the listings of the user whose profile it is.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">If the filter seems to be ignored<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check the quotes. Shortcodes copied from an email or a word processor often have curly quotes, which WordPress doesn&#8217;t read as quotes, so the value isn&#8217;t recognised. Retype them as straight quotes.<\/li>\n\n\n\n<li>Check you used <code>current_user<\/code> on a normal page. <code>current_author<\/code> only works on posts and listings.<\/li>\n\n\n\n<li>Test as the user in question. An admin viewing the page sees the admin&#8217;s own listings.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The shortcode shows 5 listings unless you set <code>post_limit<\/code>. To show a user&#8217;s favourites instead, use <code>show_favorites_only=&quot;1&quot;<\/code> with <code>favorites_by_user=&quot;current_user&quot;<\/code>. The full option list is in <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/core-widgets\/gd-listings\/\">GD &gt; Listings<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The GD &gt; Listings block, widget and &#091;gd_listings&#093; shortcode can be filtered by author with the Filter by author setting (post_author). It takes one of these values: To show the logged-in user&#8217;s own places on a page: On a UsersWP profile page, current_author shows the listings of the user whose profile it is. If the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[],"article\/categories":[213,422],"class_list":["post-2498","gd_place","type-gd_place","status-publish","hentry","gd_placecategory-extensions-features","gd_placecategory-core-widgets"],"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2498","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/types\/gd_place"}],"author":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/comments?post=2498"}],"version-history":[{"count":1,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2498\/revisions"}],"predecessor-version":[{"id":2576,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2498\/revisions\/2576"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=2498"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=2498"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=2498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}