NooTheme Premium WordPress Theme › Forums › CitiLights › Contact Agent Hide/Unhide post enquiry form filled up
- This topic has 4 replies, 2 voices, and was last updated 2 years, 11 months ago by dangdv.
-
AuthorPosts
-
2 years, 11 months ago #1217568
Greetings,
Need assistance in hiding the Agent's Contact Number in return of getting the enquiry details via a form. After filling the form the Contact details of Agent shall appear.
Regards,
OIPL
Attachments:
You must be logged in to view attached files.2 years, 11 months ago #1217572Dear, You can go to Agent Custom Fields settings and disable it.
Best regards.
2 years, 11 months ago #1217573After disabling the agent custom field phone number, no clients will be able to view contact numbers of real estate builders. Need a feature, which shows the builder's contact number after the client submits his/her information details.
2 years, 11 months ago #1217574How to create a setting by which property details can be seen after sign up or login by end user?
2 years, 11 months ago #1217575Dear, If you want change agent mobile and phone field to private and only show when user logged in, Please install and switch your site to use Citilights child theme. Then add custom code in file function.php of Citilights child theme
if ( ! function_exists( 're_agent_display_field' ) ) : function re_agent_display_field( $field = array(), $agent_id = '', $args = array() ) { if( empty( $agent_id ) || !isset( $field['name'] ) || empty( $field['name'] )) return; $field['type'] = isset( $field['type'] ) ? $field['type'] : 'text'; $id = re_agent_custom_fields_name($field['name']); if( isset( $field['is_default'] ) ) { if( isset( $field['is_disabled'] ) && ($field['is_disabled'] == 'yes') ) return; if( isset( $field['is_tax'] ) ) return; $id = $field['name']; } $field_name = str_replace( RE_AGENT_META_PREFIX . '_', '', $id ); $private_fields = apply_filters('re_agent_private_fields',[]); if(in_array($field_name, $private_fields) && !is_user_logged_in()){ return; } $value = get_post_meta($agent_id, $id, true); if( empty( $value ) ) return; $args = array_merge( array( 'label_tag' => 'span', 'label_class' => '', 'value_tag' => '', 'value_class' => '', ), $args ); $icon = isset( $field['icon'] ) ? '<i class="fa ' . $field['icon'] . '""></i>' : ''; $label = ''; if( !empty( $args['label_tag'] ) ) { $label = isset( $field['label_translated'] ) ? $field['label_translated'] : $field['label']; $label = "<{$args['label_tag']} class='label-{$id} {$args['label_class']}'>". esc_html( $label ) . ":</{$args['label_tag']}>"; } $atts = $id == RE_AGENT_META_PREFIX . '_email' ? "data-original-title='{$value}'" : ''; ?> <div class="agent-<?php echo esc_attr( $field_name ); ?>" <?php echo $atts; ?>> <?php echo $icon . $label; ?> <?php if ( $field_name === 'website' ) : ?> <a target="_blank" rel="noopener noreferrer">" title="<?php echo esc_attr( $value ) ?>"> <?php noo_display_field_value( $field, $id, $value, $args ); ?> </a> <?php elseif ( $field_name === 'email' ) : ?> <a target="_top" rel="noopener noreferrer">" title="<?php echo esc_attr( $value ) ?>"> <?php noo_display_field_value( $field, $id, $value, $args ); ?> </a> <?php else : noo_display_field_value( $field, $id, $value, $args ); endif; ?> </div> <?php } endif; add_filter('re_agent_private_fields',function(){ return ['phone','mobile']; });
Best regards.
-
AuthorPosts
You must be logged in and have valid license to reply to this topic.