Title: php code in excerpt?
Last modified: January 25, 2017

---

# php code in excerpt?

 *  [planetphillip](https://wordpress.org/support/users/planetphillip/)
 * (@planetphillip)
 * [21 years, 12 months ago](https://wordpress.org/support/topic/php-code-in-excerpt/)
 * Hi,
    I’m using the following code in my excerpts field: `<div class="img-shadowright"
   > <img src="FILENAME GOES HERE" alt="www.planetphillip.com" /></div><div class
   ="clearer">&nbsp;</div>TEXT GOES HERE&nbsp;&nbsp;` I want to replace the link
   ref with something like this: `<?php the_ID(); ?>` but it doesn’t work, does 
   anybody have any ideas? TIA Phillip [http://www.planetphillip.com](http://www.planetphillip.com)

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

 *  [Beel](https://wordpress.org/support/users/beel/)
 * (@beel)
 * [21 years, 12 months ago](https://wordpress.org/support/topic/php-code-in-excerpt/#post-64706)
 * If I understand you correctly – php code placed in the excerpt and the content
   will not run. You’ll probably need to write a filter to do the work for you.
 *  Thread Starter [planetphillip](https://wordpress.org/support/users/planetphillip/)
 * (@planetphillip)
 * [21 years, 12 months ago](https://wordpress.org/support/topic/php-code-in-excerpt/#post-64712)
 * OK, thanks for your help.

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

The topic ‘php code in excerpt?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [planetphillip](https://wordpress.org/support/users/planetphillip/)
 * Last activity: [21 years, 12 months ago](https://wordpress.org/support/topic/php-code-in-excerpt/#post-64712)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
