Automattic / Automattic/jetpack
Likes: Individual page Likes settings not respected when page is displayed outside the main query
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
Originally reported in Automattic/themes#13
#### Steps to reproduce the issue
In Shoreditch:
1. Activate Shoreditch
2. Make sure like buttons for the site are turned on globally under My Site > Sharing
3. Create a page with the Panel Page template
4. Give that page a few child pages and make sure the Like button is turned off for each individual Child Page
6. View the parent Panel Page - like buttons appear on the child panels
A similar instance in Affinity:
1. Activate Affinity.
2. Make sure like buttons for the site are turned on under My Site > Sharing.
3. Create a couple of Pages, and turn Likes off for those pages.
4. Set a Static Front Page under Customize -> Homepage Settings.
5. Go to Customize -> Theme Options -> Panel 1 and select one of the pages created in step 3.
6. Go to Customize -> Theme Options -> Panel 2 and select the other page created in step 3.
7. Publish changes and view your home page. The Likes settings for the individual child pages are not respected; you'll still see Likes enabled, even though they've been turned off for those child pages.
#### What I expected
Likes should respect the individual page/post settings before falling back to the global settings, even though the pages are displayed in a separate query.
#### What happened instead
Likes are shown according to the global settings, ignoring the individual page/post settings when displayed outside the main query.
We're working around this with Custom CSS to hide unwanted Likes for now.
Follow-up information:
* User report: 2918760-t
* User's site: https://admagicmedia.com/services/
* User report: 979454-zen
* User's site: https://esthermekkelholt.com/wat-kan-ik/
Contributor guide
Research direction
Reproduce the issue in the Shoreditch Panel Page template and the Affinity homepage panels, checking pages loaded through separate queries. Trace how Likes uses individual page settings versus global Sharing settings; done means child or selected pages with Likes disabled no longer show Like buttons while global Likes remain enabled elsewhere.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100