Links with description

Adding this to your wordpress theme will allow you to specify a category using a custom field thecat to display a listing of links / bookmarks.

<?php $theCat = get_post_meta($post->ID, 'thecat', true); ?>
				$bookmarks = array();
				$bookmarks = get_bookmarks("category=$theCat");
			if ($bookmarks[0] != '') { ?>

			<?php foreach ( $bookmarks as $bookmark ) {?>
			<tr <?php if($i%2 == 0){ ?> class="odd"<?php $i++; }else{ $i++; } ?>>
				<td><a title="<?php echo $bookmark->link_description; ?>" href="<?php echo clean_url($bookmark->link_url); ?>"><?php echo $bookmark->link_name; echo $bookmarks->term_id; ?></a></td>
				<td><?php echo $bookmark->link_description; ?></td>
			<?php }} ?>

Comments  Leave a Reply

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!