Forums

Posting my blogroll to a page (8 posts)

  1. tallycast
    Member
    Posted 3 years ago #

    I want to put my blogroll on a static page and not on the sidebar. Is this possible?

  2. krembo99
    Member
    Posted 3 years ago #

    Sure ,
    Create a page, and use ,<?php wp_list_bookmarks(); ?>

  3. cyanalab
    Member
    Posted 3 years ago #

    Thats great and its working for me, but is there a way to style this page ?

  4. Ricky
    Member
    Posted 3 years ago #

    @cyanalab There lots of ways to go about this, but since wp_list_bookmarks puts the classes "xoxo blogroll" on each ul that it generates, you could add those selectors do your stylesheet, ie:

    xoxo li { property: value }
    xoxo li a { color: #ff0; text-decoration: none }
  5. hereintokyo
    Member
    Posted 3 years ago #

    I can't get this to work. I am creating a page in wordpress, adding the code in the html editor view, and publishing the page. Still, no links appear even though there are links in the blog roll. Any advice? Thanks in advance

  6. ronchicago
    Member
    Posted 3 years ago #

    another possibility is via the sidebar widget "blogroll." go into functions.php and create a new "sidebar" function. this new function will appear in the drop-down menu in widgets section. place the new sidebar where you want it on your new page and drop the blogroll widget in there.

  7. Ricky
    Member
    Posted 3 years ago #

    @hereintokyo WordPress doesn't run PHP scripts from Page/Post content (even from HTML view). There's a plugin that makes this happen in WP 2.6, but otherwise you need to make a page template for this.

    1. Make a Page called "Links"
    2. In your themes directory, make a file called page-links.php
    3. Place this code in your page-links.php file:
      <?php
      /*
      Template Name: Links Page
      */
      ?>
      
      <?php get_header(); ?>
      	<div id="content" class="narrowcolumn">
      	<?php wp_list_bookmarks(); ?>
      	</div>
      <?php get_sidebar(); ?>
      <?php get_footer(); ?>
    4. Go back to your "Links" Page in WP Admin and change it's Template to "Links Page"

    The header, content, sidebar, footer is the basic page structure from the Default WordPress theme. Yours may differ. The important part is getting wp_list_bookmarks in a template and working.

  8. hereintokyo
    Member
    Posted 3 years ago #

    dressedinvalue, thanks! That worked!

Topic Closed

This topic has been closed to new replies.

About this Topic