Forums

List blogroll and descriptions in a single page (3 posts)

  1. extrakun
    Member
    Posted 1 year ago #

    Hi,

    I am trying to set up a page where I can show the links from the blogroll, and the description of the link - is there a function which can do that; if not, if I have to write my own PHP for that, how do I include a PHP code in a page?

    Thanks in advance!

  2. haochi
    Member
    Posted 1 year ago #

    These two pages helps.
    http://codex.wordpress.org/Pages
    http://codex.wordpress.org/Template_Tags/wp_list_bookmarks

    The default theme comes with a links.php so you are look at it and make some changes for your custom theme.

  3. iridiax
    Member
    Posted 1 year ago #

    If you don't have a links.php for your theme, save a backup copy of your page.php (just in case), and then replace the following in the original page.php:

    <?php the_content('Read more &raquo;'); ?>

    with this:

    <?php if (is_page('links')) { ?>
    <?php the_content('Read more &raquo;'); ?>
    <?php wp_list_bookmarks('show_images=0&between= - &show_description=1&category_before=&category_after=&title_before=<h3>&title_after=</h3>'); ?>
    <?php } else { ?>
    <?php the_content('Read more &raquo;'); ?>
    <?php } ?>

    For this to work, your bookmarks page has to be named Links with a page slug (permalink) of links. Change links in the above code to the actual page slug of your bookmarks page if it differs.

Topic Closed

This topic has been closed to new replies.

About this Topic