Thank you for your quick response. Sorry for the confusion.
A php loop that takes the “X” number of most shared posts. Listing them from most shared to least, while displaying the number of total shares each post has accumulated.
Thank you for the quick response. But it didn’t solve my problem when passing either $post or $post->ID
I believe I found the issue. The code is working as expected.
However, I imported all my posts from an existing site, but the featured images did not get imported. WordPress thinks that there is a featured image still attached to those posts.
I tried de-activating all my plugins. No help.