Kiran
Forum Replies Created
-
AuthorPosts
-
Hi Sandro,
To add checkbox field similar to terms & conditions, create one custom field and make it mandatory. Then use following code snippet to add link for that field.
function _gd_custom_field_input_checkbox( $html, $cf ) { $html_var = $cf['htmlvar_name']; // CHANGE LINK HERE $link = '<a href="https://www.mysite.com/privacy" target="_blank">' . __( 'Please accept privacy conditions', 'geodirectory' ) . '</a>'; $value = geodir_get_cf_value( $cf ); if ( $value == '' && $cf['default'] ) { $value = '1'; } if ( $value != '1' ) { $value = '0'; } ob_start(); ?> <div id="<?php echo $cf['name'];?>_row" class="<?php if ($cf['is_required']) echo 'required_field';?> geodir_form_row clearfix gd-fieldset-details"> <label> <?php $site_title = __($cf['site_title'], 'geodirectory'); echo (trim($site_title)) ? $site_title : ' '; ?> <?php if ($cf['is_required']) echo '<span>*</span>';?></label> <input type="hidden" name="<?php echo $cf['name'];?>" id="<?php echo $cf['name'];?>" value="<?php echo esc_attr($value);?>"/> <input <?php if ($value == '1') { echo 'checked="checked"'; }?> value="1" class="gd-checkbox" field_type="<?php echo $cf['type'];?>" type="checkbox" onchange="if(this.checked){jQuery('#<?php echo $cf['name'];?>').val('1');} else{ jQuery('#<?php echo $cf['name'];?>').val('0');}"/> <span class="geodir_message_privacy"><?php echo $link; ?></span> <span class="geodir_message_note"><?php _e($cf['desc'], 'geodirectory');?></span> <?php if ($cf['is_required']) { ?> <span class="geodir_message_error"><?php _e($cf['required_msg'], 'geodirectory'); ?></span> <?php } ?> </div> <?php $html = ob_get_clean(); return $html; } add_filter( 'geodir_custom_field_input_checkbox_geodir_Privacy', '_gd_custom_field_input_checkbox', 10, 2 );In “geodir_custom_field_input_checkbox_geodir_Privacy” replace “geodir_Privacy” with your field name.
Change the link to your desired one that you want.===
To hide “Set xxx as default category” use following css snippet..post_catlist_item .post_default_category { display: none }Kiran
This reply has been marked as private.Hi Alex,
Refer this code https://github.com/GeoDirectory/geodirectory/blob/master/geodirectory-functions/custom_fields_output_functions.php#L1287
Here $cf[‘htmlvar_name’] will be your attachment field name.
Kiran
April 25, 2018 at 9:24 am in reply to: Show all locations in dropdown? – Not giving any result #427937Hi Dirk,
Not sure about the date of next release. I can’t send files here because to fix issue need to change some code so overwriting whole files may break current functionality.
You can share FTP credentials of test site or staging site. I will update patch there and then you can copy those files to your production site.
Kiran
April 25, 2018 at 6:46 am in reply to: Show all locations in dropdown? – Not giving any result #427918Hi Drik,
Thanks for more explanation. I replicated it from my side, actually the autocomplete search showing results only matching with full names. If you search “sandy springs” then it shows “Sandy Springs” in list.
I have fixed this to show all the matching results by wildcard search.Fix will be available in next release. In case Pyou want me to update patch on your site then provide FTP credentials.
Thanks,
KiranHi Piyush,
After running tool from GeoDirectory > GD Tools > Clear All DB Versions, it fixed the saving neighbourhood value.
Now try to save neighbourhood for listings and check in front end near me search.
Let us know.
thanks,
KiranHello,
Don’t worry about future update. It was a programming issue and we have updated changed in our plugin too. 🙂
Kiran
April 25, 2018 at 4:30 am in reply to: Show all locations in dropdown? – Not giving any result #427911Hi Dirk,
I have checked and there are only two locations showing at GeoDirectory > MultiLocations > Manage Location.
Please tell how can we replicate issue from our side.
Thanks,
KiranmHello,
The issue has been fixed. It was happening when search submitted from home page.
Please check and let us know.
Kiran
This reply has been marked as private.Glad to hear that it worked for you.
Thanks for sharing 🙂
This reply has been marked as private.Hi Matt,
Finally i have fixed “500 internal server error” issue.
There are few things that causing this problem. You have selected same page for Home & Location under GeoDirectory > Permalinks which is incorrect. Home & Location page should be different. Otherwise it will looping between home & location page redirection on first time load.
FYI you can enable apache modules mod_expires, mod_headers & mod_deflate to caching media and reduce load time.
Let us know.
Kiran
Hi James,
There was a conflicts between plugins for plugin update process. I have installed one must use plugin “WP Easy Updates missing Licence key & Notifications” under Plugins > Must Use and now GeoDirectory plugins showing info to insert/activate licence in plugin manager page.
Now you have to activate your licence then go for a update plugin.
Let us know if you have any query.
Thanks,
KiranHi Alex,
I checked plugin https://wordpress.org/plugins/bainternet-posts-creation-limits/ but it not fuctioning well.
But you can refer the code and it will help you write your own code.
– Create one function that counts posts for author and post type.
– Use filter ‘wp_insert_post_empty_content’ that is executed before insert post.
– Via wp_insert_post_empty_content you can execute code that check author and post type limits. If author has already added the posts then you can add restriction here.In other way you can restrict add listing page from the user if author has already added post for that post type.
Thanks,
Kiran -
AuthorPosts