# Adjusting Custom Field Placement on Vendor Profile Page

**URL:** <https://community.hivepress.io/t/adjusting-custom-field-placement-on-vendor-profile-page/13714>\
**Category:** HivePress\
**Created:** [December 6, 2024, 12:32pm UTC](https://community.hivepress.io/t/adjusting-custom-field-placement-on-vendor-profile-page/13714 "2024-12-06T12:32:05Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![ihor](https://community.hivepress.io/user_avatar/community.hivepress.io/ihor/32/5_2.png) [@ihor](https://community.hivepress.io/u/ihor)\
**Post date:** [January 4, 2025, 9:17am UTC](https://community.hivepress.io/t/adjusting-custom-field-placement-on-vendor-profile-page/13714/10 "2025-01-04T09:17:33Z")

</div>

I’m sorry for the delay. The recent code snippet you posted should be functional, if you use vendor categories as types, please try this code snippet to make different changes to the vendor page based on the vendor type (replace 123 with the category ID):

```auto
add_filter(
	'hivepress/v1/templates/vendor_view_page',
	function( $template, $object ) {
		$vendor = hivepress()->request->get_context( 'vendor' );

		if ( $vendor ) {
			if ( in_array( 123, $vendor->get_categories__id() ) ) {
				$template = hivepress()->template->merge_blocks(
					$template,
					[
						'page_content' => [
							'blocks' => [
								'demo_custom_field' => [
									'type' => 'content',
									'content' => $vendor->get_my_custom_field(),
									'_order' => 1,
								],
							],
						],
					]
				);
			} else {
				// other vendor type
			}
		}

		return $template;
	},
	10,
	2
);

```

Hope this helps

---

_[View the full topic](https://community.hivepress.io/t/adjusting-custom-field-placement-on-vendor-profile-page/13714)._
