Automatically add classes to blog post tags? #71
-
|
In each blog post, the Blog plugin outputs plain I know I can write, for example, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Other than using the i.e. {{ post.content_html | raw | replace({'<p>': '<p class="class1 class2">'}) }} |
Beta Was this translation helpful? Give feedback.
-
|
@OrigamiOrange you could also target the p tags in your CSS by wrapping the content in a class: |
Beta Was this translation helpful? Give feedback.
Thank you, this worked, albeit with a slight tweak. At first, it was outputting encoded HTML entities, so instead of
<p>it would output<p>. But when I put therawfilter afterreplace, it worked! So the working solution looks like:which outputs the html.
Thanks so much!