• I got this HTML:

    <p><a href="THE_LINK"><img class="aligncenter size-full wp-image-39333" src="THE_IMAGE" alt="05112016_thekills-26" width="1200" height="801" /><span class="small">THE_TEXT</span></a></p>

    And I was getting a “No rules defined for img class in context of Anchor” error.

    I’m now using this rule: https://github.com/Automattic/facebook-instant-articles-wp/issues/431 and got rid of the error, but I lost the link on “THE_TEXT”:

    <figure>
            <img src="THE_IMAGE"/>
          </figure>
          <p>THE_TEXT</p>

    Anyone has an idea on how to get something like:

    <figure>
            <img src="THE_IMAGE"/>
          </figure>
          <p><a href="THE_LINK">THE_TEXT</a></p>
  • The topic ‘Help creating rule for image and text inside link’ is closed to new replies.