Title: figcaption transform bug
Last modified: October 21, 2019

---

# figcaption transform bug

 *  [zedtan](https://wordpress.org/support/users/zedtan/)
 * (@zedtan)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/figcaption-transform-bug/)
 * Hello,
 * We’re facing the same issue as OP in [https://wordpress.org/support/topic/image-figcaption/](https://wordpress.org/support/topic/image-figcaption/)
 * Was that resolved? What we currently have is:
 * \`
    <figure class=”wp-class”><img src=”file.jpg” alt=”alt-text” class=”wp-class”/
   ><figcaption>caption here</figcaption></figure> <p>Next paragraph text here</
   p> `
 * That turns into this:
 * \`
    <figure><img src=”file.jpg” /></figure><figcaption>caption here</figcaption
   >Next paragraph text here</p> `
 * This means that for any `<figure>` where we add a `figcaption`, either via wp
   5.2.x’s built-in block/gutenberg editor or through code view, both the caption
   and the proceeding paragraph doesn’t get rendered in the FB Instant Article view
   because:
 * 1. The `figcaption` has been broken out of its original containing `figure` tag
   
   2. The opening `<p>` tag for the proceeding paragraph disappears, making its 
   syntax invalid. 3. The contents of both `figcaption` and the next paragraph (
   for which the opening `<p>` tag has disappeared) still appear in the instant 
   article feed produced by WP Native Articles.
 * i’ve tried the following transform rules, to no avail:
 * \`
    <!– match: –> <figure class=”%s”><img src=”%s” alt=”%s” class=”%s” /><figcaption
   >%s</figcaption></figure>
 * <!– to: –>
    <figure><img src=”${2}” /><figcaption>${5}</figcaption></figure>
 * <!– match: –>
    <figcaption>%s</figcaption>
 * <!– to: –>
    <figcaption>${1}</figcaption><p> `
 * Please advise; thanks!
    (I can email a link to our instant article feed + specific
   instances where this occurs, or code snippets if required)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Redstar Creative](https://wordpress.org/support/users/redstar-creative/)
 * (@redstar-creative)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/figcaption-transform-bug/#post-12233918)
 * [@zedtan](https://wordpress.org/support/users/zedtan/) Hey,
    i have the same 
   problem, and the Support does’t answere me 🙁
 * Have you solved this problem?
 *  Thread Starter [zedtan](https://wordpress.org/support/users/zedtan/)
 * (@zedtan)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/figcaption-transform-bug/#post-12235316)
 * nope! Didn’t get an answer from support either
 * We ended up just not setting image captions, or just typed them as normal `<p
   >`s outside the `<figure>` block. Not ideal, but better than trying to debug 
   this ourselves.
    -  This reply was modified 6 years, 5 months ago by [zedtan](https://wordpress.org/support/users/zedtan/).
 *  [Redstar Creative](https://wordpress.org/support/users/redstar-creative/)
 * (@redstar-creative)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/figcaption-transform-bug/#post-12235570)
 * [@seakleng](https://wordpress.org/support/users/seakleng/) you have the same 
   problem in this topic [https://wordpress.org/support/topic/image-figcaption/](https://wordpress.org/support/topic/image-figcaption/),
   that was closed.
 * Do you have solved this problem?
 *  [Bob Suarez](https://wordpress.org/support/users/arsenesuarez/)
 * (@arsenesuarez)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/figcaption-transform-bug/#post-12299373)
 * The support is dead here
 *  [spvsousa](https://wordpress.org/support/users/spvsousa/)
 * (@spvsousa)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/figcaption-transform-bug/#post-12351135)
 * Same here.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘figcaption transform bug’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-native-articles_fdfefd.svg)
 * [WP Native Articles - Instant Articles Plugin for WordPress](https://wordpress.org/plugins/wp-native-articles/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-native-articles/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-native-articles/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-native-articles/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-native-articles/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-native-articles/reviews/)

## Tags

 * [figcaption](https://wordpress.org/support/topic-tag/figcaption/)

 * 5 replies
 * 4 participants
 * Last reply from: [spvsousa](https://wordpress.org/support/users/spvsousa/)
 * Last activity: [6 years, 4 months ago](https://wordpress.org/support/topic/figcaption-transform-bug/#post-12351135)
 * Status: not resolved