Automattic / Automattic/jetpack

Sharing: add option to use sharing_display() outside of the loop

Open
#1,933 9 comments 1 reaction 0 assignees View on GitHub
[Feature] Sharing Enhancement Good For Community
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

It would be nice if it were possible to use `sharing_display()` outside of the loop and specify a post ID that would be used in the buttons.

Suggested here:
https://wordpress.org/support/topic/advanced-custom-fields-and-jetpack-sharing?replies=1&view=all

Contributor guide

Open the contributing guide

Research direction

Start by locating the existing sharing_display() implementation and examining how it obtains the current post inside the loop. Determine how an explicit post ID should be accepted and used for the sharing buttons, then verify that the buttons render correctly when called outside the loop. The linked WordPress support discussion provides the original use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.