Myzwer / foothillschurch

Bootcamp II is a wordpress theme (as well as an inside joke) designed to suit the needs of foothillschurch.com. It makes use of webpack, Babel, Sass, Tailwind, Browsersync, PostCSS, ESLint, Stylelint, Prettier and more. It is meant for that site, but if you can use it by all means go for it.
1 stars 1 forks source link

Multiple values in taxonomy doesn't look good #30

Closed rain2o closed 1 month ago

rain2o commented 1 month ago

https://github.com/Myzwer/foothillschurch/blob/d75494784caf988edbcdb95afebe7becdca009e7/components/cards/message-card.php#L6-L33

This loops through the series and speaker taxonomies and displays each one that is selected for the given post. It seems that it is assumed that this will only be one, but there is no protection against that. Either require only one selection in admin, choose only the first one found in the code (which could be bad because they might see it as a bug if it drops additional selections), or make the styles handle multiple values.

I tested this to see what would happen.

Screenshot 2024-07-17 at 18 30 02
rain2o commented 1 month ago

Another location that needs to handle this the same https://github.com/Myzwer/foothillschurch/blob/effc5bbf81497ae99f0561ab7849412fe9272bfd/frontpage.php#L103-L114

rain2o commented 1 month ago

Another location https://github.com/Myzwer/foothillschurch/blob/effc5bbf81497ae99f0561ab7849412fe9272bfd/components/layouts/popular-messages.php#L42-L50

It might be helpful to create a single util that handles this logic for you, just returning 1 of each or something like that.