Archived topic
how to add social share button in breadcrumbs
9 replies · Started by Immi on August 18, 2018
Hi, is there any way to insert the social share button into breadcrumbs area.
Thank you,
Hi there,
You need to add the social sharing icons to the same hook that is used to add the breadcrumbs first.
Let me know if this helps :)
how to add. can you please help me
How are you adding it currently?
You need to find a way (or ask the plugin author) to insert it, perhaps as shortcodes, so we can use Hooks to add it where you want.
Hi there,
i have asked plugin author he provides me these instructions below please have a look on this
This would be the code you could insert:
<div class="addthis_inline_share_toolbox_nxtx"></div>
I have insert this code into the same hook that is used to add the breadcrumbs first but i have failed
could you please provide the proper code with hook html code. i have no knowledge about this.
I want to make my breadcrumbs like this: **
Thank You
Have you tried using the Hooks Element to insert it?
Then it shouldn't require any code other than that HTML.
hello, Leo
i have no knowledge of HTML can you correction with this
<?php if ( is_page() || is_single() ) : ?>
<?php endif; ?>
**
I'd recommend using our new Hooks Element as suggested above:
https://docs.generatepress.com/article/hooks-element-overview/
Then this would be the content:
<?php if ( function_exists('yoast_breadcrumb') ) : ?>
<div class="yoast-breadcrumb">
<?php yoast_breadcrumb( '<p id="breadcrumbs">','</p>' ); ?>
</div>
<?php endif; ?>
Then you can set the display rule so set it shows on all pages and posts:
https://docs.generatepress.com/article/hooks-element-overview/#display-rules
Then do the same thing for the social icons.
hi there how are you doing,
i am very excited to inform you that i have achieved it. but certainly took two days to implement and test this solution Without your guide and help, it was not possible. yesterday i have checked many times vancouver time now for your reply 😁. I am happy and satisfied with GeneratePress
I appreciate you very much.
Regards Immi Saifi
**
No problem :)