Thread Starter
Anonymous User 12115853
(@anonymized-12115853)
Well, I found it doesn’t work to place Post ID shortcode inside another shortcode.
Any idea that I can achieve this results?
https://backlinko.com/blog
If you have answer or not, all is fine for me though:)
Hi Dao,
You can get the url from the post ID and pass that in the shortcode. Something like following:
<?php echo do_shortcode( '[Sassy_Social_Share url="' . get_permalink( $post_id ) . '"]' ); ?>
Thread Starter
Anonymous User 12115853
(@anonymized-12115853)
Hi Heateor,
Thanks so much for helping.
I use Genesis, with its Simple Edits plugin.
I pasted your full code in Entry Meta (below content) field, and Sassy button is not even showed up…
Switched to regular Sassy shortcode, it showed up.
Thread Starter
Anonymous User 12115853
(@anonymized-12115853)
Ideally I hope to paste in one line of code in “Entry Meta (below content)” field, and on blog listing page, when I click different buttons on the list, they will share each single post’s URL, instead of blog listing page’s URL (happening now)
I don’t know if this is possible…
The code posted above is for use in PHP template. It won’t work if you place it in theme’s options or meta options. If you cannot use shortcode in PHP template, you don’t have any other option.
Thread Starter
Anonymous User 12115853
(@anonymized-12115853)
It works! Made a donation to you. Keep up the good work.
I installed Genesis Simple Hooks and checked Execute PHP & shortcode, and your code works:)
You’re welcome. Thanks for the donation 🙂