[wordpoints_points_logs] shortcode displays the log entries for a type of points.
Basic Usage: #
This default usage displays the most recent log entries for the default points type. If you haven’t set a default points type, then you will be required to specify which one’s logs to display using the
This will display the most recent points logs for the “credits” points type.
Specifying a Different Query to Display #
When the points logs are displayed, the Points component has to query the database to retrieve the logs. Which logs are returned depends on the query used. By default, this shortcode uses the
'default' query, which shows the most recent logs from the current site for all users, ordered from newest to oldest. You can change what logs are displayed by specifying a different query to be used.
[wordpoints_points_logs points_type="credits" query="current_user"]
This will display the log entries returned by the
'current_user' query. This query is similar to the default one, except that only logs for the current (logged in) user are returned. For more information about the available logs queries, see here. Information on how developers can add their own custom logs queries may be found here [email protected] link}.
Hiding the User Column #
In the above example, we used the shortcode to display the results of the
'current_user' query. This will result in a table where the ‘User’ column will always have the name of the current user. That’s kind of unnecessary, no? To hide the ‘User’ column, we can set the
'show_users' attribute to
[wordpoints_points_logs points_type="credits" query="current_user" show_users="0"]
'1' (or any other value) will display the Users column in the table as usual.
Making the Table Non-interactive #
By default this shortcode displays an interactive paginated table with a search box. Each of these features can be independently disabled, using the
searchable attributes, respectively. As with the
show_users attribute, setting their values to
0 disables them.
datatables attribute to
'0'. This attribute is now deprecated in favor of the
searchable attributes, and the DataTables script is no longer used.)
[wordpoints_points_logs points_type="credits" paginate="0"]
[wordpoints_points_logs points_type="credits" searchable="0"]
[wordpoints_points_logs points_type="credits" paginate="0" searchable="0"]