Title: PHP/CSS Help
Last modified: August 20, 2016

---

# PHP/CSS Help

 *  [chea24](https://wordpress.org/support/users/chea24/)
 * (@chea24)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/phpcss-help-1/)
 * Okay, so I have this code for a custom field which I place in the content area
   of single.php
 *     ```
       <?php
       $url = get_post_meta($post->ID, 'youtube', false); foreach($url as $url)
       if($url != '') : ?>
       <a href="<?php echo $url; ?>">Youtube</a></p>
       <?php endif; ?>
       ```
   
 * What it does is shows an text link within the content area of my posts, right
   below my post text. But when I post multiple text links it shows up like this:
 * Youtube
    Youtube Youtube Youtube Youtube
 * And so on… What I want it to do is only show 4 links until it moves over to the
   top. Like this:
 * Youtube Youtube
    Youtube Youtube Youtube
 * So I guess I need to do something in the CSS for that to happen? Or maybe add
   some code to the current code I have? Any guidance would help a lot.

Viewing 1 replies (of 1 total)

 *  [Code Metic](https://wordpress.org/support/users/noemermidagmailcom/)
 * (@noemermidagmailcom)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/phpcss-help-1/#post-3054839)
 * You have to include iteration stopper.
 * Jquery or Javascript can handle that.
 * I think you miss <p> for closing </p> tag.

Viewing 1 replies (of 1 total)

The topic ‘PHP/CSS Help’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Code Metic](https://wordpress.org/support/users/noemermidagmailcom/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/phpcss-help-1/#post-3054839)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
