The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[resolved] Separator between footer nav links (5 posts)

  1. singer74
    Posted 8 years ago #

    I'm trying to create footer navigation that mimics what is found on other "regular" (i.e. non-blog) websites: An inline list of links. I want to put some kind of character or symbol in between each link, such as a pipe or bullet, so that the nav looks professional and cohesive, and not just a list of words.

    Something similar can be done in the post meta data when listing category links, as explained in this document:

    Also, someone else has done something similar for listing bookmarks:

    It seems there HAS to be a way to get this to happen in the footer too, but I am not quite good enough yet to figure out where to modify the code. Someone please help!!!

    Oh, and I almost forgot, this is the code I'm using in my footer:

    <div id="footer_center">
    <?php wp_list_pages('title_li=', 'sort_column=menu_order'); ?>
    <?php wp_list_categories('title_li='); ?>

  2. Jeremy Clark
    Posted 8 years ago #

    This might work

    <div id="footer_center">
    <?php wp_list_pages('title_li=&sort_column=menu_order'); ?>
    <?php wp_list_categories('title_li=&style=list'); ?>

    In your stylesheet add this

    #footer_center li{
    border-right: 1px solid #000;
  3. singer74
    Posted 8 years ago #

    That is part of the way there, only problem is, you end up with a "separator" before your first list item too. Not a professional look and my customers are not going to like that.

    I'm looking for one of two things here: either 1) some way to indicate the first list item so it can have a different style without the separator, or 2) a way to build in the separator functionality for

    <?php wp_list_pages(); ?> and
    <?php wp_list_categories(); ?>

    as has already been done within

    <?php the_category() ?>.

    In the_category(), you can simply specify which separator you want and the function "knows" not to add it before the first li or after the last one.

  4. mendezki
    Posted 8 years ago #

    An article on A List Apart that might be useful

  5. singer74
    Posted 8 years ago #

    YES!!!!!!!! That took care of it -- Thank you so much!

Topic Closed

This topic has been closed to new replies.

About this Topic