Title: Conditional images
Last modified: August 20, 2016

---

# Conditional images

 *  [popstalin](https://wordpress.org/support/users/popstalin/)
 * (@popstalin)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/conditional-images/)
 * I have a custom rotator I’m creating and I need an arrow that overlays the current
   active image/caption/title. Is there some php foo that is basically like the 
   following:
 * if is class “active” then show this image else show nothing.
 * An example (I know my php in the example is not correct):
 *     ```
       <?php if
       <li class="active">
         <a href="#">Something <img src="image.jpg" /></a>
        { else
          <a href="#">Something</a>
       </li>
       ?>
       ```
   
 * The class “active” is attached to the li by the jQuery plugin.
 * I’ve tried the following and it doesn’t work:
    [http://pastebin.com/ZWvv7iHY](http://pastebin.com/ZWvv7iHY)
 * TIA!

The topic ‘Conditional images’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [popstalin](https://wordpress.org/support/users/popstalin/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/conditional-images/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
