Last active
January 3, 2020 08:09
-
-
Save 1naveengiri/4f08fc198fc434e54dfcb50f6f5bcadb to your computer and use it in GitHub Desktop.
Change Geodirectory map popup layout for specific CPT.
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 | |
/** | |
* I am changing map popup layout of gd_places here. | |
*/ | |
add_filter('geodir_get_template_part', 'geodir_get_template_part_callback', 10, 3); | |
function geodir_get_template_part_callback( $template, $slug, $name ){ | |
global $gd_post; | |
if( 'gd_place' === $gd_post->post_type ){ | |
?> | |
<div class="gd-bubble" style=""> | |
<div class="gd-bubble-inside"> | |
<div class="geodir-bubble_desc"> | |
<div class="geodir-bubble_image"> | |
[gd_post_images type="image" link_to="none" ajax_load="0" show_logo="true" ] | |
</div> | |
<div class="geodir-bubble-meta-top"> | |
[gd_post_badge key="website" condition="is_not_empty" badge="%%city_name%%" link="%%input%%" bg_color="rgba(0,0,0,0)" txt_color="#000000"] | |
[gd_post_title tag='h4'] | |
</div> | |
<div class="geodir-bubble-meta-side"> | |
[gd_post_content key="post_content" limit="20"] | |
</div> | |
</div> | |
</div> | |
</div> | |
<?php | |
$template = false; | |
} | |
return $template; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment