Just posting something that may help anyone that wants to display one attribute per row on a listing page if you are using the primary/secondary/ternary attributes…
i just replaced commas with line breaks with plugin WPcode on Footer section
If you mean adding the format after each option within the attribute and not after the label, unfortunately, this feature is not available yet, since options are currently comma-separated. We plan to add this functionality in the next HivePress update.
It’s ok i have this for now thanks!! i tried to paste earlier on my reply the code i used, but it wouldnt appear, i just found out i need to use ``` for code on the forum
<script>
document.addEventListener("DOMContentLoaded", function() {
document.querySelectorAll('.hp-listing__attribute span').forEach(span => {
// Split by commas and trim items
const items = span.textContent.split(',').map(item => item.trim());
// Join items with <br> before each item
span.innerHTML = '<br>' + items.join('<br>');
});
});
</script>