Social share sidebar
This topic contains 6 replies, has 3 voices, and was last updated by Kiran 6 years, 8 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: snippet
-
AuthorPosts
-
April 18, 2018 at 10:05 pm #427176
How do I replace the images found here with font awesome icons?
https://wpgeo.directory/starter/places/united-states/pennsylvania/philadelphia/restaurants/buddakan/
Thank you.
April 18, 2018 at 10:17 pm #427178There is no option to do that.
The only way would be to change them with a custom function and a filter: https://wpgeodirectory.com/codex/?post_type=codex_creator&s=geodir_social_sharing_buttons&codex_project=0
This is a customization
Thanks
April 18, 2018 at 10:24 pm #427179Ok, I will try to figure this out. Thank you.
April 18, 2018 at 10:31 pm #427181Hi again. Is there a way I can just hook the supreme social code into the directory starter? I looked at the link but I don’t see where the images can be swapped out. The code is definitely not at clear as it is here:
<ul class="sd-cta-favsandshare"> <?php if (!$preview) { ?> <li><a rel="nofollow" target="_blank" title="<?php echo __('Share on Facebook', 'supreme-directory'); ?>" href="http://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>&t=<?php urlencode(the_title()); ?>"><i class="fa fa-facebook"></i></a></li> <li><a rel="nofollow" target="_blank" title="<?php echo __('Share on Twitter', 'supreme-directory'); ?>" href="http://twitter.com/share?text=<?php echo urlencode(html_entity_decode(get_the_title(), ENT_COMPAT, 'UTF-8')); ?>&url=<?php echo urlencode(get_the_permalink()); ?>"><i class="fa fa-twitter"></i></a></li> <li><a rel="nofollow" target="_blank" title="<?php echo __('Share on Google Plus', 'supreme-directory'); ?>" href="https://plus.google.com/share?url=<?php echo urlencode(get_the_permalink()); ?>"><i class="fa fa-google-plus"></i></a></li> <?php } else { ?> <li><a rel="nofollow" target="_blank" title="<?php echo __('Share on Facebook', 'supreme-directory'); ?>" href=""><i class="fa fa-facebook"></i></a></li> <li><a rel="nofollow" target="_blank" title="<?php echo __('Share on Twitter', 'supreme-directory'); ?>" href=""><i class="fa fa-twitter"></i></a></li> <li><a rel="nofollow" target="_blank" title="<?php echo __('Share on Google Plus', 'supreme-directory'); ?>" href=""><i class="fa fa-google-plus"></i></a></li> <?php } ?> </ul>
April 18, 2018 at 10:35 pm #427183This reply has been marked as private.April 18, 2018 at 10:36 pm #427184Sorry, nevermind.
April 19, 2018 at 5:06 am #427199Hi Joy,
Add following code snippet in your theme functions .php file or add code via snippet plugin.
function _gd_custom_fontawesome_social_sharing_buttons( $content = '' ) { if ( ! ( geodir_is_page( 'detail' ) || geodir_is_page( 'detail' ) ) ) { return $content; } ob_start(); ?> <div class="geodir-company_info geodir-details-sidebar-social-sharing"> <div class="gd-custom-fa-share"> <style> .gd-custom-fa-share { text-align: center; } .gd-custom-fa-share a { margin: 0 7px; font-size: 1.25em; } </style> <?php if ( geodir_is_page( 'preview' ) ) { ?> <a rel="nofollow" target="_blank" title="<?php echo __( 'Share on Facebook', 'geodirectory' ); ?>" href=""><i class="fa fa-facebook"></i></a> <a rel="nofollow" target="_blank" title="<?php echo __( 'Share on Twitter', 'geodirectory' ); ?>" href=""><i class="fa fa-twitter"></i></a> <a rel="nofollow" target="_blank" title="<?php echo __( 'Share on Google Plus', 'geodirectory' ); ?>" href=""><i class="fa fa-google-plus"></i></a> <?php } else { ?> <a rel="nofollow" target="_blank" title="<?php echo __( 'Share on Facebook', 'geodirectory' ); ?>" href="http://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>&t=<?php urlencode( the_title() ); ?>"><i class="fa fa-facebook"></i></a> <a rel="nofollow" target="_blank" title="<?php echo __( 'Share on Twitter', 'geodirectory' ); ?>" href="http://twitter.com/share?text=<?php echo urlencode( html_entity_decode( get_the_title(), ENT_COMPAT, 'UTF-8' ) ); ?>&url=<?php echo urlencode( get_the_permalink() ); ?>"><i class="fa fa-twitter"></i></a> <a rel="nofollow" target="_blank" title="<?php echo __( 'Share on Google Plus', 'geodirectory' ); ?>" href="https://plus.google.com/share?url=<?php echo urlencode( get_the_permalink() ); ?>"><i class="fa fa-google-plus"></i></a> <?php } ?> </div> </div> <?php $content = ob_get_clean(); return $content; } add_filter( 'geodir_social_sharing_buttons_html', '_gd_custom_fontawesome_social_sharing_buttons', 10, 1 );
Thanks,
Kiran -
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket