Kiran
Forum Replies Created
-
AuthorPosts
-
In preview geodir_get_post_meta() will not work, so you have to use global $post;
Ex:<td> <?php global $post; if ( ! empty( $post->geodir_min_asistentes_escuela ) ) { ?> echo $post->geodir_min_asistentes_escuela; <?php } else { ?> No Disponible <?php } ?> </td>Kiran
Hello,
Issue has been fixed. It seems you have translated am, pm to blank text and it was breaking date translation/un-translation.
I have fixed it from our end.
Thanks,
KiranThis reply has been marked as private.July 14, 2018 at 6:49 am in reply to: Listings not going to draft and reminder emails not being sent #438365This reply has been marked as private.This reply has been marked as private.Hello,
You have to create field from GeoDirectory > CPT Settings (eg: Place Settings).
Create field with html var name (key) = custom_address. Reason behind adding field via field manager is you do not need to write any extra code to save field on submit listing.There is a chance that field may display twice on form. One via manually by my snippet and one via custom field manager. You can hide field that will be displayed via field manager by using hook: https://github.com/GeoDirectory/geodirectory/blob/master/geodirectory-functions/custom_fields_input_functions.php#L78
Kiran
July 13, 2018 at 12:37 pm in reply to: Listings not going to draft and reminder emails not being sent #438258Hello Jen,
Please provide us FTP credentials so we can do some debugging to find issue.
Kiran
Hi,
Here is example to add custom field under address field:
function _gd_custom_extra_address_field( $custom_field ) { ?> <div id="geodir_custom_address_row" class="geodir_form_row clearfix gd-fieldset-details"> <label><?php _e( 'Custom Address', 'geodirectory' ); ?></label> <input field_type="text" name="geodir_custom_address" id="geodir_custom_address" class="geodir_textfield gd-form-control" type="text"> <span class="geodir_message_note"></span> </div> <?php } add_action( 'geodir_address_extra_listing_fields', '_gd_custom_extra_address_field', -10, 1 );Thanks,
KiranHello,
Use following code snippet to display “Not Available” instead of empty or 0 value for particular field.
function _gd_custom_set_not_available( $html, $location, $cf, $p = '' ) { if(is_int($p)){$post = geodir_get_post_info($p);} else{ global $post;} if ( ! empty( $post ) && in_array( $cf['htmlvar_name'], array_keys( (array) $post ) ) ) { $field_value = $post->{$cf['htmlvar_name']}; if ( $field_value === NULL || $field_value === '' ) { $value = __( 'Not Available', 'geodirectory' ); // null or empty } else if ( $field_value === 0 || $field_value === '0' ) { $value = __( 'Not Available', 'geodirectory' ); // 0 (zero) } else { $value = $field_value; // > 0 } $class = ($cf['htmlvar_name'] == 'geodir_timing') ? "geodir-i-time" : "geodir-i-text"; $field_icon = geodir_field_icon_proccess($cf); if (strpos($field_icon, 'http') !== false) { $field_icon_af = ''; } elseif ($field_icon == '') { $field_icon_af = ($cf['htmlvar_name'] == 'geodir_timing') ? '<i class="fa fa-clock-o"></i>' : ""; } else { $field_icon_af = $field_icon; $field_icon = ''; } $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;"><span class="'.$class.'" style="' . $field_icon . '">' . $field_icon_af; $html .= (trim($cf['site_title'])) ? __($cf['site_title'], 'geodirectory') . ': ' : ''; $html .= '</span>'; $html .= $value; $html .= '</div>'; } else { $html = ''; } return $html; } add_filter( 'geodir_custom_field_output_text_var_geodir_capacity', '_gd_custom_set_not_available', 10, 4 ); // Replace "geodir_capacity" with your field nameNOTE: Replace “geodir_capacity” with your field name in last line of snippet
Thanks,
KiranHi James,
Please provide us some more details how you want it, so i can help you with that if it is achievable via action/filter.
Kiran
This reply has been marked as private.Hi Kevin,
The breadcrumb link issue has been fixed.
The was conflict with Yoast SEO addon. We have fixed it and it will be available in next release.
You can find patch here: https://github.com/GeoDirectory/geodirectory/commit/7d59c1c23dc5271c4404bba86e9dde3e3d6360e9Thanks,
KiranJuly 12, 2018 at 1:06 pm in reply to: Add Listing goes to empty page if user is not logged in #438128Hi,
Your theme style conflicting with the GD pages. I have added style in style.css to fix login page content.
Please check and let us know.
Kiran
July 12, 2018 at 8:21 am in reply to: wpgeodirectory pages does not has the wordpress sidebar #438102This reply has been marked as private.July 12, 2018 at 8:09 am in reply to: wpgeodirectory pages does not has the wordpress sidebar #438099Please check now.
I have added following style in style.css to fix this.
#main-content:after { clear: none; } -
AuthorPosts