{"id":2633,"date":"2026-10-20T08:35:23","date_gmt":"2026-10-20T07:35:23","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/show-logged-in-user-listings\/"},"modified":"2026-10-20T08:40:18","modified_gmt":"2026-10-20T07:40:18","slug":"show-logged-in-user-listings","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/how-tos\/show-logged-in-user-listings\/","title":{"rendered":"How to show the logged-in user&#8217;s listings with GD > Listings"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Use the GD > Listings widget, block or shortcode with the author filter set to <code>current_user<\/code>. It then shows only the listings created by whoever is logged in, which is what you want on a &#8220;My listings&#8221; or account page.<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-php\">&#091;gd_listings post_type=&quot;gd_place&quot; post_author=&quot;current_user&quot; post_limit=&quot;10&quot;&#093;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In the block or widget, this setting is called Filter by author. It is in the Filters group, under the advanced settings.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The values for post_author<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>current_user<\/code>: listings by the logged-in visitor. Logged-out visitors see no listings.<\/li>\n\n\n\n<li><code>current_author<\/code>: listings by the author of the listing being viewed. Use it on a listing details page, for example for a &#8220;More from this owner&#8221; section. On an ordinary WordPress page it shows no listings.<\/li>\n\n\n\n<li>A user ID such as <code>11<\/code>: listings by that user only.<\/li>\n\n\n\n<li>Empty: listings from all authors.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Older guides use <code>post_author=&quot;current&quot;<\/code>. It still works, but it behaves like <code>current_author<\/code>, so on a normal page it shows nothing. Use <code>current_user<\/code> for the logged-in visitor.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Places and events on one page<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Add one GD > Listings for each post type, each with its own <code>post_type<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-php\">&#091;gd_listings post_type=&quot;gd_place&quot; post_author=&quot;current_user&quot; title=&quot;My places&quot;&#093;\n&#091;gd_listings post_type=&quot;gd_event&quot; post_author=&quot;current_user&quot; title=&quot;My events&quot;&#093;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">When the user has no listings<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">By default the widget shows &#8220;No listings were found matching your selection.&#8221; Tick Hide widget if no posts? (<code>hide_if_empty=&quot;1&quot;<\/code>) to show nothing at all instead. To change the wording, see <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/translations\/how-to-change-just-one-language-string\/\">How to change just one language string<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Other ways to give users their listings<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/core-widgets\/gd-dashboard\/\">GD > Dashboard<\/a> widget gives logged-in users links to their own listings, favorites and add listing forms. See also <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/core-features\/how-can-my-users-edit-or-delete-their-listings\/\">How can my users edit or delete their listings?<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Use the GD > Listings widget, block or shortcode with the author filter set to current_user. It then shows only the listings created by whoever is logged in, which is what you want on a &#8220;My listings&#8221; or account page. In the block or widget, this setting is called Filter by author. It is in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[],"article\/categories":[211,432],"class_list":["post-2633","gd_place","type-gd_place","status-publish","hentry","gd_placecategory-tips-tricks-more","gd_placecategory-how-tos"],"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2633","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=2633"}],"version-history":[{"count":1,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2633\/revisions"}],"predecessor-version":[{"id":2790,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2633\/revisions\/2790"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=2633"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=2633"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=2633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}