Support » Fixing WordPress » Links: Description vs. Notes (semi-urgent)

  • So I went and noticed the addition of ‘Notes’ to the fields in Links. But how do I go about using them?
    See the problem is that so far I’ve used Description quite a bit, but since I want to do something a bit more advanced with the links system (sort of a mini content management system or something like that) the inclusion of HTML support is much needed.
    For an example of what I want to do have a look at this ‘sketch’ of my new design, it’s the two green boxes out on the right. (Never mind the design, it’s a sketch 🙂
    Ideally I would want the get_links to automatically format everything, but seeing as it’s quite rigid in what it can do I’ll need to format the title of the box in the notes using HTML.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi Michael,
    If you have a look in the file wp-links/links.php there is a new function get_linkobjects() .
    This function works a little like the main WP ‘loop’. It returns an array of link objects you can loop through with a foreach loop, and you can refer to each of the elements of a link individually within your loop.
    So you can do something like
    $links = get_linkobjects(1);
    if ($links) {
    foreach ($links as $link) {
    echo <<<LINK
    <td rowspan=”2″>link_url”><img src=”$link->link_image” /></td>
    (I’ve not tried this exact example but you get the idea)
    All the available fields are documented in the file with the function.
    Hope this helps,

    I think some formatting might’ve been lost here 🙂 Could you mail it to me on Thanks a lot!

    Did you get this working OK? I also had problems using what was posted- it seems to be missing a few characters or something. I’m not quite sharp enough with php to put it together..



    <?php $links = get_linkobjects(1);
    if ($links) {foreach ($links as $link) {echo <<<LINK
    <div class="memberslinkpost">
    <div class="memberslinkimagecolumn">
    link_url"><img src="$link->link_image" />
    <div class="memberslinktextcolumn">
    <span style="color: #567F88; text-transform: lowercase; float: right; padding-right: 8px;
    ">« $link->link_description</span>
    <div class="memberslinktextbody">

    This is what I have in my page now with CSS divs added in. Thought it might be useful to someone.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Links: Description vs. Notes (semi-urgent)’ is closed to new replies.