It’s very common to award GamiPress points/badges/ranks on users’ visit at any page on GamiPess site according to its default achievement system and surely there isn’t any option to award points/badges/ranks on visiting custom post-type posts only, but how amazing it is, if you eagerly like to add this feature simply to GamiPress and experience it.
All the snippets below will be used for WooCommerce “Product” post-type. As an example. Users will be getting points/badges/ranks on visiting WooCommerce products or specific product pages.
Note: GamiPress and WooCommerce plugins must be configured in order to use these snippets.
Let’s Check it now;
This snippet will add a new trigger (heading) to GamiPress as rest of the default triggers shown in drop down.
This snippet will easily list all the WooCommerce products to the triggers.
This snippet will be used to display label on GamiPress activity log.
This snippet will award points/badges/ranks to WooCommerce/specific products on visiting it.
So, All you need to add this code snippet to your theme functions.php file to award points/badges/ranks on visiting custom post-type posts only.
Enjoy!
Leave A Comment