[resolved] Get Feed, Image, URL of an Individual Link in Your Blogroll (4 posts)

  1. kulpreetsingh
    Posted 8 years ago #

    Hello :)

    With posts, you can insert <? post_title() ?> and similar tags to get specific information from a post. You can also, using plugins, get the custom tags from a post.

    Is there a way to do this with links in your blogroll?

    Can I get 1, or more, links from my blogroll, and for each, show the title of the link, the image for the link, and the description of the link?

    Please forgive my weird php logic below - but this is what I mean...

    <? get_links(1,category); ?>
    <? for each link ?>
    <a href="<? get_link_URL(); ?>"><? get_link_title(); ?></a>
    <img src="<? get_link_img(); ?>" alt="<? get_link_title(); ?>" align="left">
    <? get_link_description(); ?>
    <? end foreach; ?>

    I do not want to use wp_list_bookmarks - I want be able to take different information from links and put that in different places like you can with posts.

    If it's not possible with wordpress php tags, is it possible with a database query using php?

  2. kulpreetsingh
    Posted 8 years ago #

    Anybody? :S

  3. Use the get_bookmarks() function to get the bookmarks, then you can do what you want with them.

    $bookmarks = get_bookmarks();
    foreach ($bookmarks as $bookmark) {
    echo $bookmark->link_name;
    echo $bookmark->link_url;
    echo $bookmark->link_image;
    echo $bookmark->link_description;
  4. kulpreetsingh
    Posted 8 years ago #

    What?! really!? I will try this right now! Thank you so much!!

Topic Closed

This topic has been closed to new replies.

About this Topic