Roots Discourse

How to add custom classes into blade


I have a partial which injects classes into the article element on a custom archive page, but I need to add additional classes in, the code is like:

article @php post_class() @endphp
// general code stuff in here

So I need to inject some additional custom classes in their too, is there a method like:
post_class() => "myClassOne, myClassTwo etc "

in this example I want to add additional classes col-md-3 col-lg-4 into the article element

Can anyone advise? I’m using Sage9


Use post_class('col-md-3 col-lg-4'), see post_class

Please use WordPress Stack Exchange or another resource for generic WordPress questions


Ah as simple as that? Nice one, will check on WP next time!

unlisted #4