Wordpress - Display H5P results in a different page

Hello! Is there a way I can create a page for the user that it's not the wp-admin dashboard, so they can see their results, or maybe a shortcode to put in a widget?

Additionally, as an admin and teacher can I see my logged student records on the admin dashboard?



I have got how to see the results for everyone, sorry it was in the admin panel. But still it would be amazing to know how can I call the data results for the logged user :)


icc's picture

Hi! Unfortunately, there's no easy way to print the results outside of the admin area. You would have to create a custom plugin which fetches the results from the database table and displays it to the user.

It sounds like something more people could be interested in, but currently, we have no plans for making such as feature. Let us know if funding this feature would be of interest to you.

Hi! thanks for the reply, I am very very happy about this tool. Really. I don't know, not being a developer, how could I help you guys with it. For now, I am telling about it to all my friends that are teachers and explaining how to use it. At least the way I do.

About the plugin, unfortunately I have to skip for now since I only follow cake recipes on the internet. But I was thinking if I can pass PHP instructions in a custom page and how I can do it. I tried to copy the script and the div I saw on the developers tool but it didn't work.

If it's not possible, no worries! I am really satisfied with this tool (although an audio quiz "question set" type would be a good feature for language classes ;) )

Thank you!

falcon's picture

Glad to hear that you're spreading the word! An audio quiz "question set" sounds like a good idea. I made something like that for Flash back in the years and it was very useful.
icc's picture

Actually, if the user is logged in you should have access to the AJAX endpoint. So the work would be to replicate or reuse the functions display_results_page() and print_data_view_settings() from admin/class-h5p-plugin-admin.php inside a widget. This should not be a big job. I will note it down for when I get some spare time.

Thank you for the suggestion and kind words about H5P!

Thank you guys, and I wish you all the best!

When the WP top admin bar is disabled for logged in users (which is my case), students can't see their results. I would really like my students to know their progress in training : which exercises they have tried, what results they got. It would be useful if each logged in user could access, on the front-end side of the site, to a list of the activities that he has tried and his results. I hope that this missing feature will be developed in the future ! Thanks anyway for the great job that you are doing here !

icc's picture

I agree, it would be nice with some different widgets you could insert via shortcodes. E.g. the current user's results and a sort of leaderboard for a specified content id.
Can be very useful in different scenarios.

Apparently, a teacher who is using the WP-H5P plugin to create exercises and activities for students has developped... "something" (widget, plugin, don't know) to display students results outside of the WP-admin area. Indeed, a logged in teacher can follow his students results on the front-end (see screenshot, "test test" is a fake student I added) and a logged in student can access his assigned exercises and results as well (see screenshot, "test test" is the logged in student).

Hi Realia, if I got it right another teacher developed this piece of code and you were able to put in your website, right? Can you share how did you achieve that? This is something I have been desiring for some time. Thanks in advance!

Hi Nefero ! I would gladly share with you the piece of code and use it on my website if I knew how this teacher did ! Unfortunately, I don't know how to achieve the same thing. I thought that he used a plugin but apparently there is no plugin to handle and display the H5P scores on the user's end. So he has probably developed this by himself ? I really wish that I could replicate what he did but this is far beyond my abilities... 

icc's picture

Very cool to see that someone has made this. I wish they would share or create a pull request, that way we could try to incorporate into the h5p plugin.

The H5P plugin does already provide the data, so it should just be a matter of creating a view/widget for the display.
As much as the H5P Team would love to create this ourselves, we currently have to prioritize paid work. Let us know if you know of someone who would like to fund such a feature, perhaps a school, company or even government.

It is a very good idea!

Hi ! I really understand that you do have to prioritize paid work - don't we all ? :p If my school had money I would suggest a funding but it is broke (as is the educational system in France... ) Maybe one day someone will fund and/or develop this useful feature - let's hope so ! In the meantime, I should ask the teacher who did it if he's willing to share the piece of code he used so that it is incorporated into the H5P plugin and available for everyone. Who knows ? I'll keep in touch about that.

falcon's picture

Would be great if he would share the code. Shared code is at least as good as funding :)

Having results shown on the page would be a great tool for mine students. It's even one of the few things i need. :)

falcon's picture


Well not me... but my husband has found a way to display a page with the H5P results displayed to a logged in user on the front-end of the website. This is not beautiful code, he says, because he hadn't time to get how H5P works exactly but it works. Here is how it looks like : http://take.ms/xUGRg

I am using Wordpress (last version), H5P (last update) and the free Customizr theme (https://fr.wordpress.org/themes/customizr/). I don't know if the file that I am providing below will work with every themes but it can be a good base to work on and to adapt to your theme.

All you have to do is :

1) Upload with FTP in Wordpress the h5P-results.php file : https://dl.dropboxusercontent.com/u/2996761/h5p-results.php . Put it here : wp-content/themes/your-template/page-templates/

2) Create a new page in WP (not a new post, but a new page) and name it Results or Scores or whatever you like. When you add this page, be sure to select the H5P results template as you can see on this screenshot : http://take.ms/zWJzo

3) On the sidebar of the site you can add a widget with a button linked to this page of results (something like : http://www.yoursite.com/results/). Now, when a student is logged in, he can see his results on the front-end side of the site.

As for me, I am using these WP plugins :

The results page shows : the name of the H5P activity, the student's score (if it is red, then this score is less than 50%), the last time the student has tried this activity and the time spent on it. The results are ordered from the most recent to the less recent. To translate the french statements to your language, you can edit the provided H5P-results.php page.

Once again, I don't know if the provided file will work with all WP themes and I must add that the code is not beautiful but it works for me, so I hope that it could be useful to others :)



falcon's picture

Awesome, thanks for sharing!

Hello Realia,

I have installed the plugin Mycred and i really like the button award system of it. I was wondering if you know how to give award points when someone finished a H5P content? For example when finishing ''fill in the blanks'' the user gets points or a award for it.



Hi Mitchz !

Unfortunately, I don't know how to achieve that... My idea with Mycred is to use this award system to encourage student to connect to my website in order to train themselves on a daily basis even if they train on only one exercise and to reward their efforts accordingly. But of course to award them if they finish an H5P activity would be even greater !



Hi isabelle ;i didnt find the uploaded  file ; 

pliz can you reapluoded again ??

Hi isabelle , hope that uu do fine 

I'm actually working on this plugin H5P but i have some issus with the other things for exemple how teaher can add his own student and diplay the results by student and also the workplan ?? i supposed this is a template exemple can uu pliz help me 

Wow Isabelle! This is awesome! Thanks for sharing, detailing how to do it and thanks for your husband too. I will try to do it here as you explained. :)

Hi !

I've updated the provided file because there were some unused lines in it that were hanging here and there and there was a check specific to my use of H5P but not universal so please try this file instead of the previous one : https://dl.dropboxusercontent.com/u/2996761/h5p-results.php.

I also found out a bug with the date : it did not reflect the actual date of an exercise but was displayed in UTC. As I am in France, all timestamps were then 2 hours earlier... So I have added a line to display the dates / hours according to a specified timezone. You have to manually edit the file (line 145) : it says "date_default_timezone_set('Europe/Paris');", change "Europe/Paris" with what you need. See the documentation on this page to select the correct timezone : http://php.net/manual/en/timezones.php.

Let me know if the file is working. I've tested it on my WP with my theme ; I'd like to know if it works for others ;)



I just tried the h5p file (both) you have uploaded. Unfortunately the created results page stays blank. Hopefully the h5p team can use your (husbands) code in the future. It looks really like a usefull tool. :)

I was kind of fearing that this would depend on my theme (Customzr). I think that it can easily be adapted to other thems though by using the template files generally included in WP themes and by copying-pasting the provided code. I am going to edit the file and add comment to where the relevant code begins and where it ends. Maybe then you could use it too. What WP theme are you using BTW ?



Hi Isabelle,
I'm struggling the same problem with a blank results page. My WP instalation is brand new with Customizr theme activated.
Any ideas on how to get the results work?


The links to the previously mentioned h5p-results.php page template file don't work anymore. Does anyone have that and care to share? We're looking to implement a similar front-end WordPress view of H5P content and having that file would be super helpful. Thanks!

otacke's picture

Hi fontsnob!

Hope that someone in the community can help you out.


Hi Isabelle,

We are creating a new mathematics website for primary school. We would like to use your results file to check what students already know and what's a difficult goal to reach.

Would you like to share you results file for H5P again with me? :-)



It sound wonderfull if there was a way to that. (although i don't understand everything you say, still learning :) )The theme i'm using a the moment is called second touch theme. A family member bought it some time ago.



Hi everyone, for a project we're working on we've come up with a shortcode plugin so you can display h5p results on the front end - credit to tristan mackay for actually coding it - https://github.com/tristanmurdoch/wordpress-plugin-h5p_results/blob/mast...

papi Jo's picture

Just tested Tristan Mackay's h5p_results plugin for WP. It works fine. Suggestions: please provide a "help" link in the plugin which would list the shortcodes available.

Suggestion. In file h5p_results.php change the description line from

* Description: Adds custom shortcodes for H5P results.
* Description: Adds custom shortcodes for H5P results. <a href="https://github.com/tristanmurdoch/wordpress-plugin-h5p_results/blob/mast...">List of shortcodes</a>

thanks for testing

where should i upload this php file? sorry i am not very well versed in this

I figured it out. Put the php file in a zip on its own and install it as a plugin. Then you can use the shortcodes where ever you want the results to be posted.


[h5p_results] Results listed for Current User

[h5p_results userid=”1″] Results listed for defined user.

[h5p_results userid=”1″ tablename="New Name"] Results listed for defined user.

[h5p_results display=”row”] Results as a row for Current User.

[h5p_results display=”row” userid=”1″] Results as a row for defined user.

[h5p_results userid=”all”] Results as a row for all users.

Paste the codes in the brackets including the brackets in the pages where you want to see the results. You will need to change the id of the user if you want to view their results.

Good luck.


Any chance you could provide some installation advice?

icc's picture

Very cool, thanks for sharing it with everyone!

Guys, I am so grateful for this! It's just what I needed to round out my learning dashboard for users. :-) Thank you!!

After my initial euphoria... It shows "no results yet" without specifying a user, and if I add any of the other shortcodes (userid or row) I get a php error on line 55. I'd really love to get this to work, and I'm certain other users would be overjoyed to know about it.

Cant believe its been so long that people ask for this. Since the code the devs asked for is provided. Can it be integrated in the h5p wordpress plugin? I cant get it to work. This is one of the last things i need. 

If you still require help, please get in touch with me, I will help you out

If you still require help for displaying h5p results please gett in touch with me and I will help you out

could you please help me on this, i tried tristan's soln but it dint work for me

Hi can u help me create one static page where users login only with NAME and after this run Quiz h5p and after this i can see results who is the best?


Hi ! Could you please help me out? The plugin above is not recognised by wordpress. I just want to be able to show results on the profile page.

otacke's picture


What about sticking to one thread? https://h5p.org/comment/46248#comment-46248



Hi can you help me please? iI've installed the plugin and tried all shortcodes but all i get is "no results". Thank you

Hi can you help me please? i've instaled the plugin and tried all shortcodes but all i get is no results. thnak you

I tryed to install result.php but wordpress said: there is no plug in to install. Can someone help?  I downloaded this zip from github.