This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('geodir_after_search_button','my_html_after_search_button',10); | |
function my_html_after_search_button(){ | |
echo "Hello World"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This is a simple example of how to move sidebar elements around, it assumes the array has not already been filtered. | |
*/ | |
add_filter('geodir_detail_page_sidebar_content','geodir_detail_page_sidebar_content_move',10,1); | |
function geodir_detail_page_sidebar_content_move($order_arr){ | |
// Set temp values for the sections | |
$temp_edit_section = $order_arr[3]; | |
$temp_info_section = $order_arr[5]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('geodir_is_reviews_show','my_remove_rating_listing_page',10,2); | |
function my_remove_rating_listing_page($is_display,$view){ | |
if($view=='listview'){ | |
return false; | |
} | |
return $is_display; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This example allows iframes on the custom field "video1" | |
add_filter('geodir_save_post_key',"my_allow_html_tags",10,2); | |
function my_allow_html_tags($tags, $pkey){ | |
// $pkey is "geodir_" followed by the field HTML variable name, eg: "geodir_video1" | |
if($pkey=='geodir_video1'){ $tags .= "<iframe>";} | |
return $tags; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Here we can chnage any map options, this example removes the buttns to chnage map view from satalite/road etc. | |
The filter works per map, you wil need to get the map ID from the source code "geodir_map_options_{$map_canvas_name}" | |
In the example below my map ID is "geodir_map_v3_home_map_3" | |
*/ | |
add_filter("geodir_map_options_geodir_map_v3_home_map_3","my_theme_change_map_options",10,1); | |
function my_theme_change_map_options($options){ | |
$options['mapTypeControl']=false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Replace 'menu' in "geodir_show_geodir_menu" with the html varibale of your custom field | |
add_filter("geodir_show_geodir_menu","myTheme_change_menu_title", 10,2); | |
function myTheme_change_menu_title($html, $variables_array){ | |
if($parts = explode('target="_blank">',$html)){ | |
$html = $parts[0].'target="_blank">Click Here for Our Menu</a></div></div>'; | |
} | |
return $html; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="gd_contact_form"> | |
<form id="form" class="form" accept-charset="UTF-8" enctype="application/x-www-form-urlencoded" method="post"> | |
<div class="content"> | |
<div id="section0"> | |
<input id="name" style="display: none;" type="text" placeholder="Your Name (required)" /> | |
<div class="field"><input id="gd_name" required="" type="text" placeholder="Your Name (required)" /></div> | |
<div class="field"><input id="gd_email" required="" type="email" placeholder="Your Email (required)" /></div> | |
<div class="field"><input id="gd_subject" type="text" placeholder="Subject" /></div> | |
<div class="field"><textarea id="gd_message" placeholder="Your Message" wrap="hard" required></textarea></div> | |
<input id="gd_send" class="button download-btn" name="Send" type="submit" value="Send" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* CONTACT FORM CSS */ | |
.form{ | |
max-width: 100%; | |
min-width: 25%; | |
border-width: 2px; | |
border-color: #CCCCCC; | |
border-radius: 0px; | |
color: #222222; | |
font-size: 14px; | |
margin: 0px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'wp_ajax_gd_contact_form_send', 'gd_contact_form_send' ); | |
add_action( 'wp_ajax_nopriv_gd_contact_form_send', 'gd_contact_form_send' ); | |
function gd_contact_form_send(){ | |
if(isset($_POST['gd_name'])){$gd_name = esc_attr($_POST['gd_name']);}else{die('error');} | |
if(isset($_POST['gd_email'])){$gd_email = esc_attr($_POST['gd_email']);}else{die('error');} | |
if(isset($_POST['gd_subject'])){$gd_subject = esc_attr($_POST['gd_subject']);}else{$gd_subject='';} | |
if(isset($_POST['gd_message'])){$gd_message = esc_attr($_POST['gd_message']);}else{die('error');} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // <-- You probably dont need this line if adding to a php file already | |
add_action('geodir_after_inquiry_form_field', 'add_website_to_contact_form',10,1); | |
function add_website_to_contact_form($location){ | |
if($location=='inq_phone'){ | |
?> | |
<div class="row clearfix"> | |
<div class="geodir_popup_heading"> | |
<label><?php _e('Website', 'geodirectory');?> :</label></div> | |
<div class="geodir_popup_field"> |
OlderNewer