Get the current vendor image

I’m trying to get the current vendor’s image, then put it inside a shortcode to add it to the account page, but my code throws a critical error to the site.

can you tell me how to get the current vendor’s image? thanks

also, how can I edit the favourites tempate? I can’t find it on hivepress > templates

Hi,

Please provide more details on where exactly you are trying to move the vendor image or other details that may help us understand your issue.

Also, please provide information about the page in question, and we will show you the correct template.

I need to put it inside the template as a shortcode like this Screenshot by Lightshot

my code doesn’t work

function hp_loggedin_user_profile_image_shortcode() {
	if ( is_user_logged_in() ) {
		$user_id = get_current_user_id();
		$user_image = get_user_meta( $user_id, 'user_profile_picture', true );
		if ( ! empty( $user_image ) ) {
			return '<img src="' . $user_image . '" alt="' . get_the_author_meta( 'display_name', $user_id ) . '"/>';
		} else {
			return 'No profile picture found.';
		}
	}
	return '';
}
add_shortcode( 'hp_loggedin_user_profile_image', 'hp_loggedin_user_profile_image_shortcode' );

also, I need to edit this template Sign In – ListingHive but i can’t find it inside the hidepress > templates Screenshot by Lightshot

Hi,

Sorry for the inconvenience, but customization is beyond our support scope - it includes fixing bugs and guidance about the available features Support Policy | HivePress

If customizations are required for your site, please try customizing it using the collection of code snippets Search · user:hivepress hivepress/v1/templates · GitHub and other developer resources, or consider hiring someone for custom work https://fvrr.co/32e7LvY

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