Bold first word in title field Site design I am working on the first word of ever page title is bold. The code looks like this;

&lt;h1 class="section__heading"&gt;&lt;strong&gt;Discover&lt;/strong&gt; Riaflex Today&lt;/h1&gt;


I am struggling to find a simple solution to do this in Craft.

If I setup a simple rich text field then it wraps "p" tags around it. I have tried to used Markdown but this is the same and also end up with ** in the &lt;'title'> output.

Anyone done something similar or can offer a fairly simple approach. I had a quick  attempt at editing radactor but dropped it as it didn't seem to work and remove 'p' tags.

Thanks.
You can grab the first word with the split filter according to this thread

{% set array = entry.title|split(' ', 2) %}
&lt;h1 class="section__heading"&gt;
   &lt;strong&gt;{{ attribute(array, 0) }}&lt;/strong&gt;
   {{ attribute(array, 1) }}
&lt;/h1&gt;


I didn't test this tough.

Edit: there is a Twig Fiddle demonstrating it.