Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Share button fix #737

Merged
merged 6 commits into from
Nov 4, 2024
Merged

Share button fix #737

merged 6 commits into from
Nov 4, 2024

Conversation

dersimoezdag
Copy link
Contributor

Die share-Buttons für WhatsApp und Facebook haben nicht funktioniert. Hiermit gefixed

Copy link
Member

@albig albig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. This adds the url of the article to the shared text which makes sense.

Copy link
Member

@albig albig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You fixed the WhatsApp but broke the facebook sharer link. The one and only parameter facebook accepts is the url to the article. So you must not remove get_permalink() as frist string.

Will you fix it or should I?

@dersimoezdag
Copy link
Contributor Author

You fixed the WhatsApp but broke the facebook sharer link. The one and only parameter facebook accepts is the url to the article. So you must not remove get_permalink() as frist string.

Will you fix it or should I?

I didn't remove the get_permalink(), :) I added it, because it was not there before and therefore Facebook didn't work or I misunderstood your comment. But feel free to fix it!

@albig
Copy link
Member

albig commented Oct 29, 2024

Sorry, seems I was a little confused. You are right. get_permalink() ist correct. But the second paramter rawurlencode( (string) get_the_title() ), has to be removed. Otherwise you have the title of the post on the title tag and the following "Share on Facebook" is useless because there are only two string placeholders.

inc/template-tags.php Outdated Show resolved Hide resolved
Co-authored-by: Alexander Bigga <[email protected]>
@dersimoezdag
Copy link
Contributor Author

Ah! I see! You are right! Thank you for your feedback! :)

@albig albig merged commit 1d9db90 into verdigado:main Nov 4, 2024
1 check passed
@dersimoezdag dersimoezdag deleted the share_button_fix branch November 4, 2024 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants