this page here hidden link map is in the top right(or will be when only one map shows)
i have setup login/register/edit profile forms for my site.
the registration form uses Custom Fields Group (user fields) i have a group registration , in that group is (Sales Address)
it is working just fine .
on an advert post i am trying to display a map (with marker) for the user who LISTED the advert ( not the user viewing the page)
i am using the view located here
hidden link
the view is inserted directly into my post.php .
the page is loading a map for all site users rather than just ONE map with one marker . i can not see anywhere how to set the query for this. thanks
Hello and thank you for contacting the Toolset support.
To better assist with this issue, I'll need to check the view closely in the admin area. Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **
The view does not have any filters, so it will always return all the users. I updated the view to take the post's author in a shortcode attribute. Check this screenshot hidden link
Then the code should be updated as follow:
<?php echo do_shortcode("[wpv-view name='user-reg-sales-address' user='[wpv-post-author format='meta' meta='ID']']");?><br>
I updated this file with it, but it does not seem to be the one used by the theme hidden link
I'll let you update your theme file. Let me know which one is it if it does not work for you too.
that is the correct file , if you remove <?php echo do_shortcode("[wpv-view name='user-reg-sales-address' user='[wpv-post-author format='meta' meta='ID']']");?><br>
the map disappears. when re enter it the map is back but there are 40 odd maps still .
thanks jamal
I was able to fix this by using the Toolset wpv_do_shortcode function instead of WordPress dp_shortcode. The Toolset function is useful for cases of nested shortcodes. You can read more about it on this filter https://toolset.com/documentation/programmer-reference/views-filters/#wpv-pre-shortcode
The page renders only one map that corresponds to the data of the post's author. Check this screenshot hidden link
Let me know if that resolves the issue or if I missed something.
My issue is resolved now. Thank you Jamal very much appreciated!