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

How to show only one image per comic using archive template? #360

Closed
AxleArtz opened this issue Apr 24, 2021 · 2 comments
Closed

How to show only one image per comic using archive template? #360

AxleArtz opened this issue Apr 24, 2021 · 2 comments

Comments

@AxleArtz
Copy link

So I'm trying to make a gallery page with the Webcomic archive, but some comics have multiple images and I only want the first image to show. Is there a way to set it so that it will only show one image per comic?

  • Webcomic 5.0.6
  • WordPress 5.7.1
  • PHP 7.4.16
@sailorptah
Copy link

Looks like the PHP to do it was covered here:

#325

I swear there was a previous support question that got the exact code to do it in CSS, but now I can't find the thread :/

So I haven't tested this, but you should be able to do it with "display:none" applied to every image except the first one:

https://techstacker.com/select-all-elements-except-first-child-selector/

@AxleArtz
Copy link
Author

@sailorptah, Thank you! The CSS worked for what I needed.

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

No branches or pull requests

2 participants