title: Wordpress/PHP: How to add a class to a child tag
body: <p>I'm using a page builder for Wordpress and therefore I can't directly apply a css class to a child tag.</p>
  
  <p>For example,</p>
  
  <pre><code>&lt;div class="container"&gt;
   &lt;img&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I'd like to add a class to the image tag. How can I achieve this with PHP and potentially adding that PHP code to my functions.php file?</p>
  
  <p>So I'd like to make it look like:</p>
  
  <pre><code>&lt;div class="container"&gt;
   &lt;img class="custom-class"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I'd greatly appreciate your help!!</p>