Kiran

Forum Replies Created

Viewing 15 posts - 4,141 through 4,155 (of 6,022 total)
  • Author
    Posts
  • in reply to: Edit "add new listing form" #428036

    Kiran
    Moderator
    Post count: 7069

    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 : '&nbsp;'; ?> <?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

    in reply to: How to increase search box length in home page and n #428034

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Get attachment from listing id #427946

    Kiran
    Moderator
    Post count: 7069

    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


    Kiran
    Moderator
    Post count: 7069

    Hi 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


    Kiran
    Moderator
    Post count: 7069

    Hi 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,
    Kiran

    in reply to: How to increase search box length in home page and n #427914

    Kiran
    Moderator
    Post count: 7069

    Hi 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,
    Kiran

    in reply to: Search in home page leads to default language #427912

    Kiran
    Moderator
    Post count: 7069

    Hello,

    Don’t worry about future update. It was a programming issue and we have updated changed in our plugin too. 🙂

    Kiran


    Kiran
    Moderator
    Post count: 7069

    Hi 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,
    Kiranm

    in reply to: Search in home page leads to default language #427832

    Kiran
    Moderator
    Post count: 7069

    Hello,

    The issue has been fixed. It was happening when search submitted from home page.

    Please check and let us know.

    Kiran

    in reply to: Strange behaviour when searching for events by date #427821

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Limit listings of certain CPTs to 1 per user #427819

    Kiran
    Moderator
    Post count: 7069

    Glad to hear that it worked for you.

    Thanks for sharing 🙂

    in reply to: Search in home page leads to default language #427779

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Header Size #427778

    Kiran
    Moderator
    Post count: 7069

    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

    in reply to: Plugin Updates Not Working #427777

    Kiran
    Moderator
    Post count: 7069

    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,
    Kiran

    in reply to: Limit listings of certain CPTs to 1 per user #427680

    Kiran
    Moderator
    Post count: 7069

    Hi 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

Viewing 15 posts - 4,141 through 4,155 (of 6,022 total)
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount