Re-order WordPress Plugin ‘Business Profile’ Contact Fields

Business Profile plugin is a great SEO microdata schema WordPress plugin for business with a number of fields to display contact information and have rich schema in the markup. The fcontact ields are output in a default way…

  • phone
  • contact
  • name
  • address
  • opening_hours
  • map
  • parent_organization
  • address

There is a filter that allows you to change the order – bpwfwp_component_callbacks

Here is a code snippet you can add in functions.php – just change the order of the array to suit.

 

add_filter( 'bpwfwp_component_callbacks','ha_contact_deats');	
// Re-order BP fields
function ha_contact_deats(){
	
	$bp_order =  array(
		'phone'               => 'bpwfwp_print_phone',	
		'contact'             => 'bpwfwp_print_contact',			
		'name'                => 'bpwfwp_print_name',
		'address'             => 'bpwfwp_print_address',
		'opening_hours'       => 'bpwfwp_print_opening_hours',
		'map'                 => 'bpwfwp_print_map',
		'parent_organization' => 'bpfwp_print_parent_organization',
		'address'             => 'bpwfwp_print_address',
		
	);

	return $bp_order;
}	

So in the above the phone detail will output before the email and address – change yours to suit.

business profile contact-order

Leave all Comment