Title: Plugin dev question &#8211; stop further conversions
Last modified: August 19, 2016

---

# Plugin dev question – stop further conversions

 *  [skromta](https://wordpress.org/support/users/skromta/)
 * (@skromta)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/plugin-dev-question-stop-further-conversions/)
 * I’m not sure this is the right place to post this, if not please let me know 
   where I should ask the question.
 * I’m writing my first plugin (a filter) which is also one of my first PHP projects.
   I’m a bit confused over how my code works in WP and I assume I’ve missed something.
   After having stripped away all the code that actually did something I have a 
   filter that returns the following text
 * `<div><a href="xx"> <img src="yy" /> </a> text </div>`
 * Which shows up the same way on the wordpress page. But if I change this to
 * `<div><a href="xx"> <img src="yy" /> </a> <p>text</p> </div>`
 * then I get
 *     ```
       <div><a href="xx"> <img src="yy" />  </a>
       <p>text</p>
       </p></div>
       ```
   
 * when on the wordpress page. As far as I understand WP seem to do some processing
   of the code I generate … which in this case generates some faulty HTML code.
 * Can anyone please explain what is happening and what I can do to prevent the 
   processing of the code I’ve generated.

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

 *  Thread Starter [skromta](https://wordpress.org/support/users/skromta/)
 * (@skromta)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/plugin-dev-question-stop-further-conversions/#post-888518)
 * bump
 *  [Daiv Mowbray](https://wordpress.org/support/users/daiv/)
 * (@daiv)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/plugin-dev-question-stop-further-conversions/#post-888559)
 * WordPress does filter content .
    And it does add p tags, usually correctly. This
   can be turned off. I use the plugin headspace2 for seo and it has this function
   in it’s option page. I believe there is a plugin which only does this, disable
   content p tag wraps. good luck with your plugin development. I’ve just launched
   first beta of my first plugin. lots of issues…
 *  Thread Starter [skromta](https://wordpress.org/support/users/skromta/)
 * (@skromta)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/plugin-dev-question-stop-further-conversions/#post-888560)
 * Thanks. It turned out that there was a bug in the current version of WP (2.6.3),
   description and solution can found here [http://trac.wordpress.org/ticket/7988](http://trac.wordpress.org/ticket/7988)

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

The topic ‘Plugin dev question – stop further conversions’ is closed to new replies.

## Tags

 * [filter](https://wordpress.org/support/topic-tag/filter/)
 * [post processing](https://wordpress.org/support/topic-tag/post-processing/)

 * 3 replies
 * 2 participants
 * Last reply from: [skromta](https://wordpress.org/support/users/skromta/)
 * Last activity: [17 years, 7 months ago](https://wordpress.org/support/topic/plugin-dev-question-stop-further-conversions/#post-888560)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
