• Resolved designtwo2

    (@designtwo2)


    Hi there

    Thank you for this plugin.

    I have added a custom field via a plugin to the wordpress users registration / fields and want that custom field to pulled into the Leaderboard preview. I have managed to add the columns with titles in the back and frontend of the leaderboard but am having trouble pulling in the custom fields.

    Are you able to assist me with this please?

    Thank you

Viewing 1 replies (of 1 total)
  • Plugin Author web-able

    (@web-able)

    Hey there. There are several things that has to be adjusted in the code in order to support such thing. I tried to list all these here but it went too long and too complicated to explain (even tho I broke it down step by step). So I will just list you the steps you need to take instead, and hopefully you are a developer or will find someone to implement it.
    – Find out how is the custom field stored in the database. Most probably it’s using the usermeta table in which case you only need to find out the field’s key. If you used a plugin to add that field, I bet the plugin will show you somewhere in the admin dashboard what’s the key.
    – Modify both the database queries inside the betpress_get_leaderboard_details() and betpress_get_active_leaderboard_details() located in the /functions.php file. What needs to be change is to add another join which would fetch the custom field for each user.
    – Once that’s data is loaded, all you need is to change the template located in views/shortcodes/leaderboard.php to display the custom field (just copy/paste the nickname column and replace with the custom field’s key)
    – And of course a few basic tweaks in the includes/css/style.css file would be required in order to tell the width of the new column.

    That’s the best I could do to help you. Hopefully, it’s useful

Viewing 1 replies (of 1 total)
  • The topic ‘Leaderboard’ is closed to new replies.