WordPress.org

Support

Support » How-To and Troubleshooting » How to produce a ‘Blogroll’ per post

How to produce a ‘Blogroll’ per post

  • Hi,

    I’m producing a site and the client has asked to produce a series of entries each with their own list of custom links, much like a ‘blogroll’ you get in blogs.. but I need to somehow work WordPress so I can produce one of these per post.

    Using custom fields seems a step in the right direction but at first guess my only reasoning in order to make this workable is to give each list item a unique custom field title both for the link and the link title.. which won’t work as theirs an unspecified number of potential links per page..

    Does anyone have any advice on how to address this problem?

    All the best!

    Keith

Viewing 5 replies - 1 through 5 (of 5 total)
  • If the links are in the post, you might look at how Link Harvest does its thing and modify that for your use.

    If the link are not in the post then using Custom Fields would seem the way to go. Of course that’s assuming you don’t want to develop some other custom solution.

    I would be willing if only I possessed the knowledge. The way I see it the way custom fields are structured aren’t practical ways of display hyperlinks and their titles, in fact I would say Custom fields aren’t a way to go but something only faintly in the right direction, am I wrong?

    I tried calling the blogroll in a loop on my ‘single.php’ page.. which works, but I then tried to display a particular category linking the id with a custom field to the post. But I’m not sure if you can call a custom field within a call like that for the blogroll.. is that even possible?

    You should be able to do that.

    Another idea is to just put the appropriate links at the end of each post as part of the post content.

    Ok, thanks.

    How then would I drop the call for the custom field then into the blogroll? This is the call

    <?php wp_list_bookmarks('title_li=&categorize=0&category=2'); ?>

    If the regular call to output the id is..

    <?php $values = get_post_custom_values("list-id"); echo $values[0]; ?>

    I tried a few different ways but none seemed to work, any advice?

    If your link category is the custom field on a post…this in The Loop:

    <?php
    $linkcat = get_post_meta($post->ID, 'list-id', true);
    wp_list_bookmarks('title_li=&categorize=0&category='.$linkcat);
    ?>

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to produce a ‘Blogroll’ per post’ is closed to new replies.
Skip to toolbar