Give Badges to Users

Hello,

Is there a way to give badges to users, such as the “Pro” badge that appears? Or to possibly allow specific users to add a detail to their profile once we’ve verified it’s legitimate?

Or do you have any type of workaround with the current versions of Hivepress and the extensions?

Thank you,
Andrew

Yes, it is possible to add badges but it requires advanced customization. If you are familiar with code customization then, for example, please check verified badge implementation in /plugins/hivepress/templates/vendor/view/vendor-verified-badge.php, and please check this tutorial on templates customization Customizing Templates I HivePress Developer Docs - YouTube

If you mean vendors as specific users then as a workaround please try to disable the Allow direct registration setting in HivePress/Settings/Vendors and enable the Manually approve new listings setting in HivePress/Settings/Listings. Then regular users can not become vendors until your approvement of their listings and so they can not add specific information which is enabled only for vendors

Hello,

This doesn’t appear to affect the badge for users at all. In the code, it should be for a check mark with a circle around it and say verified. I’ve included the code from the file here:

// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;

if ( $vendor->is_verified() ) :
	?>
	<i class="hp-vendor__verified-badge hp-icon fas fa-check-circle" title="<?php echo esc_attr_x( 'Verified', 'vendor', 'hivepress' ); ?>"></i>
	<?php
endif;

When editing this code, or even just deleting it, the PRO badge is unaffected. Is there another area that is used for the badges instead?

Thank you,
Andrew

If you create a similar file please try to include this file in the template with hooks to add badges for vendors (as regular users do not have their public accounts and adding badges for regular users can require advanced customization) hivepress/v1/templates/vendor_view_block or hivepress/v1/templates/vendor_view_page. Please check this tutorial on templates customization Customizing Templates I HivePress Developer Docs - YouTube

Alse please try customizing it using the collection of code snippets Search · user:hivepress · GitHub and other developer resources, or consider hiring someone for custom work https://fwd.cx/hLhc73mQCD9R

Hello,

I plan on editing the already existing file. I don’t intend to create another file in order to prevent having to customize the theme more.

The code I provided in my last post is from the file you directed me to. It doesn’t seem to affect the badge at all. It appears that this file may not even be in use by the theme, maybe?

Do you know what file dictates the “PRO” badge for verified users? It doesn’t seem to be the one you referenced in your first response.

Thank you,
Andrew

If you use the TaskHive theme then you can find the file for the Pro badge by this path /themes/taskhive/hivepress/vendor/view/vendor-verified-badge.php

But please try to use a child theme to make changes to save these changes even after new updates. Here is a tutorial Customizing Templates I HivePress Developer Docs - YouTube

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.