• Hi everyone,

    Is there anyway to create a shortcode that counts the total number of countries of WordPress users?

    I’m using BuddyBoss, where users location is obtained on signup via Google Maps geolocation with the BP Maps for Members plugin.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • If you can program a bit yourself… This plugin might be able to help: https://www.ads-software.com/plugins/shortcoder/

    But apart from stat plugins, which show it only to admins… I don’t know a plugin nor a piece of code that can do that.

    Moderator bcworkz

    (@bcworkz)

    Where is this user location stored? You should be able to do a COUNT()…GROUP BY query to get a list of locations with a count. Generic non-WP example..

    Roll that into a shortcode that generates appropriate content from the returned data. If you have a lot of users, this could be a pretty “expensive” query (in processing time). It may be worth implementing some sort of caching scheme so the query doesn’t have to be re-done every time someone requests the page.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Displaying total number of countries of users’ is closed to new replies.