That's easy to solve if I understand what you mean. And there are two ways to do it.
I have done that in Dutch (I will give you the translations below) by using the snippets plugin Code Snippets and creating the following snippet:
add_filter('uwp_account_available_tabs', 'uwp_account_available_tabs_cb', 10, 1);
function uwp_account_available_tabs_cb($tabs){
$tabs['your-listings'] = array(
'title' => __( 'uw advertentie(s)', 'userswp' ),
'icon' => 'fa-solid fa-list-check',
);
return $tabs;
}
add_filter('uwp_account_page_title', 'uwp_account_page_title_cb', 10, 2);
function uwp_account_page_title_cb($title, $type){
if ( $type == 'your-listings' ) {
$title = __( 'Beheer uw advertentie(s)', 'uwp-messaging' );
}
return $title;
}
add_filter('uwp_account_form_display', 'uwp_account_form_display_cb', 10, 1);
function uwp_account_form_display_cb($type){
if ( $type == 'your-listings' ) {
echo do_shortcode( '<div style="margin-left:-1rem; margin-right:-1rem;">[gd_listings post_author="current_user" post_type="gd_classifieds" post_limit="6" add_location_filter="0" sort_by="az" title_tag="h3" layout="2" view_all_link="0" bottom_pagination="1" template_type="template_part" tmpl_part="gd-archive-item-list-square" slide_interval="5" mb="3" category="0"]</div>');
}
}
This will add a tab to the user-account and once clicked on it it will show the users listings.
A few notes:
- set post limit to whatever number is needed
- where it says tmpl_part I use the gd-archive-item-list-square but you can set whatever template part you prefer.
- uw advertenties means your ads/listings
- beheer uw advertenties means manage your ads/listings
- layout is 2: the number of columns the page shows.
A second way to create a page showing a user his listings is by creating a normal text-page, for example 'my listings.
Make sure (if you use it Classic Editor is off, and add the folowing shortcode:
[gd_listings post_author="current_user" post_type="gd_classifieds" post_limit="6" add_location_filter="0" sort_by="az" title_tag="h3" layout="3" view_all_link="0" bottom_pagination="1" template_type="template_part" tmpl_part="gd-archive-item-list-square" slide_interval="5" mb="3" category="0"]
This creates a separate page where a user can see his own listings. In this case I used three columns.
Please note that if you create this page you need to add it to the user-menu somewhere in such a way that the link is only shown to logged in users.
On my sites I use both, but the easy way to use it is the second one. If you create a page it already shows in the menu a link to add a shortcode, look for gd_listings and make the proper selection. As soon as you have done that on the right select 'use this shortcode and you're done. Here you can also select the card-template you want to use. Besides that it is more lightweight than the snippet.