Title: Stripping out custom code
Last modified: October 17, 2017

---

# Stripping out custom code

 *  Resolved [jpeek](https://wordpress.org/support/users/jpeek/)
 * (@jpeek)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/stripping-out-custom-code/)
 * I have some custom code inside my captions on images. A couple of span tags with
   attribution text basically. Unfortunately these seem to make it across to Apple
   News as visible html tags, so I’ve got a rather ugly looking block of html tags
   underneath each image inside the Apple News article.
 * Is there any way to strip out those tags, leaving the content of the caption,
   or alternatively just dropping out the caption entirely?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Kevin Fodness](https://wordpress.org/support/users/kevinfodness/)
 * (@kevinfodness)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/stripping-out-custom-code/#post-9682471)
 * Hi [@jpeek](https://wordpress.org/support/users/jpeek/)—
 * Yes, you have two options here. The first of which is to use the Customize JSON
   feature to edit the template for images with captions and remove the caption 
   block. The other option would be to use a filter to modify the HTML that Publish
   to Apple News parses when it generates the JSON. I would recommend `apple_news_exporter_content`:
   [https://github.com/alleyinteractive/apple-news/wiki/Action-and-Filter-Hooks#adminapple-actionsindexclass-exportphp-1](https://github.com/alleyinteractive/apple-news/wiki/Action-and-Filter-Hooks#adminapple-actionsindexclass-exportphp-1)

Viewing 1 replies (of 1 total)

The topic ‘Stripping out custom code’ is closed to new replies.

 * ![](https://ps.w.org/publish-to-apple-news/assets/icon-256x256.png?rev=3017580)
 * [Publish To Apple News](https://wordpress.org/plugins/publish-to-apple-news/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/publish-to-apple-news/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/publish-to-apple-news/)
 * [Active Topics](https://wordpress.org/support/plugin/publish-to-apple-news/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/publish-to-apple-news/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/publish-to-apple-news/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Kevin Fodness](https://wordpress.org/support/users/kevinfodness/)
 * Last activity: [8 years, 8 months ago](https://wordpress.org/support/topic/stripping-out-custom-code/#post-9682471)
 * Status: resolved