-
Notifications
You must be signed in to change notification settings - Fork 19
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
Comments are being displayed in the carousel #29
Comments
Hello everyone, After a further investigate about the solution, I have found a workaround propsose by this link As the website suggest
A simple digging about the source code, I found out that we can simply add a comparison below the for each scope display-medium-posts/display-medium-posts.php Line 133 in 929079c
The code snippet may look something like the following if (count($post->categories) == 0) {
continue;
} The only side effect I can think of is that if a post does not have any category, it will be consider as comment and as a result will not be shown. @acekyd Any thoughts about the above fix. |
Hello @mike820324, I came across this same fix online but the edge cases were why I hesitated to implement it. Doesn't seem like there's a better alternative. To send the PR, would be great to include an attribute so the user can set if they want to turn comments off instead e,g [display_medium_posts handle="@acekyd" comments=false] |
@acekyd thanks for the reply. The underline investigation and code snippet can be found in my medium post I'll try to implement the GraphQL into the PHP version.
Will do. |
I am using the recommended code to add the Medium carousel to the homepage and if there's a comment added to one of the posts it shows up in the carousel.
The text was updated successfully, but these errors were encountered: