PHP/CSS Help
-
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
YoutubeAnd 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
YoutubeSo 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)
Viewing 1 replies (of 1 total)
The topic ‘PHP/CSS Help’ is closed to new replies.