Skip to content

Instantly share code, notes, and snippets.

View erdivyang10's full-sized avatar
😃
Lets Focus On AI and Machine learning

Divyang Goswami erdivyang10

😃
Lets Focus On AI and Machine learning
View GitHub Profile
@erdivyang10
erdivyang10 / gist:7e88abea85a16c0744b9e820dce6af02
Created March 15, 2019 05:50
Filter to change the label text of the "Select Category" in the category filter in listings : WP Google Maps Gold
//use this filter to change the label of the "Select Category" label in the category filter in listings
add_filter('wpgmp_text_settings','wpgm_category_label_change',1,10);
function wpgm_category_label_change( $category_label ) {
$category_label['select_category'] = 'Select Department'; //insert any category label as per your need
return $category_label;
}
@erdivyang10
erdivyang10 / disable-map-script.php
Last active February 28, 2019 05:21
Disable Enfold Theme Google maps script using a Filter
//A filter to disable the google maps script in Enfold Theme. Need to insert this filter on activated Wordpres theme functions.php
add_filter('avf_load_google_map_api', 'disable_google_map_api', 10, 1);
function disable_google_map_api($load_google_map_api) {
$load_google_map_api = false;
return $load_google_map_api;
}
@erdivyang10
erdivyang10 / gist:ee88824a2b9e924061d64d0fca53655f
Created December 21, 2018 09:47
Change Map Language according to site Language: Google Maps Wordpress Plugin
//Filter to change map language according to site language
add_filter('wpgmp_map_lang','wpgmp_map_lang' );
function wpgmp_map_lang($lang) {
global $post;
if( $post->ID == 7520 )
{
$lang = 'en';
}
if ( $post->ID == 7534 )
@erdivyang10
erdivyang10 / gist:eedaa5c2b40993d29e0d00976778940d
Created October 18, 2018 05:15
Display Map and Listing Side by Side using Hook : Wp Google Maps Gold Wordpress Plugin
//This is the code to display your map and listings side to side. Please insert it in your activated theme functions.php
add_filter("wpgmp_map_output","wpgmp_map_output",1,4);
function wpgmp_map_output($output,$map_div,$listing_div,$map_id)
{
$output="<table width='100%'>
<tr><td width='50%' valign='top' style='vertical-align:top;'>".$listing_div."</td>
<td width='50%' valign='top' style='vertical-align:top;'>".$map_div."</td></tr>
</table>";
@erdivyang10
erdivyang10 / gist:7567854e2b3f689fcdbea23c201963a3
Created October 1, 2018 05:50
Fixed the excerpt length of Posts location in Google Maps: Wp Google Maps Pro
//Filter the except length to 20 words.
*
* @param int $length Excerpt length.
* @return int (Maybe) modified excerpt length.
*/
function wpmaps_custom_excerpt_length( $length ) {
return 20;
}
add_filter( 'excerpt_length', 'wpmaps_custom_excerpt_length', 999 );
@erdivyang10
erdivyang10 / gist:b1f50b3610a1051fa215dfb03cd24bdc
Last active September 21, 2018 11:23
Filter to change the placeholder text of Zip code search bar (Zip code to Post Code): Woocommerce Delivery Area Plugin
//Filter to change the placeholder text of Zip code search bar: Delivery Area Plugin
add_filter('wdap_provide_zipcode_placeholder','wdap_provide_zipcode_placeholder',1,1);
function wdap_provide_zipcode_placeholder($zipcode_placeholder)
{
$zipcode_placeholder = 'Enter Post Code';
return $zipcode_placeholder;
}
@erdivyang10
erdivyang10 / gist:6b1ccc63dbf62cd03dbaf99926a74b8e
Created July 20, 2018 10:40
Filter to change the text "Product Availability" on product page: Woocommerce Delivery Area Pro
# Insert this filter on your activated theme functions.php
add_filter("wdap_pa_tab_heading","wdap_change_product_availability_text");
function wdap_change_product_availability_text($text){
$text = "Product Availability"; // Insert any text which you want to change
return $text;
}
@erdivyang10
erdivyang10 / gist:bce3f48947bd40614721d532642b6ac6
Created July 11, 2018 06:12
Hook to change the text of social media share in Was This Helpful Wordpress Plugin
// Was this helpful social media text change "Awesome Share it" to any other text
You need to insert this filter on your activated theme functions.php
add_filter( 'wth_change_text', 'wth_change_text',1,1 );
function wth_change_text($wth_js_lang) {
$wth_js_lang['wth_share_ask']= 'Enter your Text';// Insert text which you want to be change
return $wth_js_lang;
}
@erdivyang10
erdivyang10 / gist:266bb42eb85396a45cd65204c091f1d4
Created April 27, 2018 06:27
Change Listing Search bar Text using a Hook- WP Google Maps Gold Wordpress Plugin
//Change the Listing Search bar text by using a Hooks, Please insert this code on your activated theme functions.php
add_filter('wpgmp_text_settings','wpgmp_text_settings',1,1);
function wpgmp_text_settings($default) {
$default['search_placeholder']= 'Enter your Country';// Insert text which you want to be change
return $default;
}
@erdivyang10
erdivyang10 / gist:8d50da62b48e518af79424e3608a2395
Last active April 14, 2018 05:53
Hook to Change Booking Purpose Message - WP Booking Pro Plugin
add_filter('wpbmp_purpose_placholder','wpbmp_purpose_placholder');
function wpbmp_purpose_placholder($purpose_plc)
{
$purpose_plc = 'Insert your custom Purpose message Here';
return $purpose_plc;
}