One of the features you are most appreciating about Post Pay Counter PRO is the shortcode, which provides you with the ability to display the statistics and payment details in public pages.
This allows your users to see stats without having to access the admin section. This is useful when users are not supposed to ever access wp-admin, neither for writing posts nor for any other matter. In this way, they will not need to access wp-admin to see their earnings.
The shortcode is [ppc]. If you use it as it is, with no parameters, the default stats page will be shown: general stats with a time range which is the default one set in Options > Misc settings > Default stats time range.
To get detailed stats (specific for an author), you can use the parameter author, feeding it with the user ID of which stats should be shown. For example, [ppc author=1] will show detailed stats for user ID 1 (usually the admin of the site). You can also use [ppc author="current"] to make the user selection dynamic: in this case, the stats for the user who opens the page will be shown.
You may want to set a time range different than the default one. For this, the parameters are tstart and tend, and accept a UNIX timestamp. An example would be [ppc author=1 tstart=1388534400 tend=1388538800]. These two, of course, can be used together with the author parameter or not, it is completely up to your needs. The parameter display_timerange can be used to hide the time range, and accepts a boolean-integered value, meaning either 1 or 0 (eg: [ppc author=1 display_timerange=0])
Finally, you may want to exclude some cols from displaying, as public themes are often less wide than the admin template. For this, it is enough to list them in the parameter exclude; you can separate them with the delimiter you prefer (a comma, for example). [ppc author=1 exclude="post_id, post_publication_date"] will show stats for user ID 1 excluding post id and publication date from the display table. You can mix them however you prefer.
Valid column names for general stats are: author_id, author_name, author_words, author_visits, author_images, author_comments, author_adsense_revenues, author_written_posts, autho_bonus, author_total_payment, author_due_payment; while for detailed stats are: post_id, post_title, post_type, post_status, post_publication_date, post_words, post_visits, post_adsense_revenues, post_images, post_comments, post_bonus, post_total_payment, post_due_payment.
There are a couple more parameters that can be set in the shortcode to achieve more personalized views:
- display_overall=1 – To display overall stats at the bottom of the stats table (this will display total counts and payments per counting type, number of written posts and total due payment).
- time_range=”last_month” – Provides a dynamic shortcut to last month stats. Will display stats from the previous month.
time_range=”last_week” – Provides a dynamic shortcut to last week stats. Will display stats from the previous week.
time_range=”current_month” – Provides a dynamic shortcut to current month stats. Will display stats from the current month.
As a side note, bear in mind that marking posts as paid and full payment history features are not available in shortcoded stats, as they are advanced and dynamic features which rely on the admin section.
To display the current author payment history, there is another shortcode, which is [ppc_author_payment_history].