WordPress.org

Ready to get started?Download WordPress

Forums

Using the Connections Theme... (8 posts)

  1. cbaisden
    Member
    Posted 9 years ago #

    I would like to have the "Link Category" appear along with the links. How do I do this?

  2. Jonathan Dingman
    Member
    Posted 9 years ago #

    Please provide a link to your example site so we can help you further with the debugging and/or formatting.

  3. tqn69
    Member
    Posted 9 years ago #

    Has anyone modified the Connections theme's index.php so as to use "get_links_list()," which

    "Displays a nested HTML unordered list of all links as defined in the Links Manager, sorted under link category headings. Link categories are automatically generated inside of <h2> headings."

    When I do this, I get a big ugly bullet next to the category.

    If you're handy with CSS, could you post the code to fix this? I would be deeply grateful.

  4. tqn69
    Member
    Posted 9 years ago #

    By the way, my blog is at http://coopblue.com/blog/. Currently using the default "get_links()." Thanks.

  5. cbaisden
    Member
    Posted 9 years ago #

    My blog is http://www.symphonyblog.com

    Here is an answer I got from another guy:
    The Quick and Dirty way would be,

    <h2><?php _e('PSO Links'); ?></h2>

      <?php wp_get_links(1)?>

    <h2><?php _e('Corporate Sponsors'); ?></h2>

      <?php wp_get_links(2)?>

    and so on and so forth. This will work for good. but in future if you change the 'category name' from the wp links, it will not change what you have put here on this page. I do not know any other way of looping through the link categories and generating this.

  6. oriecat
    Member
    Posted 9 years ago #

    Why don't you just use get_links_list?

  7. oriecat
    Member
    Posted 9 years ago #

    tqn69, you probably need to add list-style-type: none; to your css. Without seeing it active on the site tho, I'm not sure which section it would need to go into...

  8. tqn69
    Member
    Posted 9 years ago #

    @cbaisden: nice site, and thanks for the technique. However, I wanted to make get_links_list() work since it would be self-maintaining.

    @oriecat: I get what I want by doing this in index.php:
    <li><?php get_links_list('order'); ?></li>

    and this in style.css:
    #sidebar li {
    list-style-type: none;
    }

    Unfortunately, the generated code isn't valid XHTMLbecause those <li> tags ought to be wrapped in <ul> or <ol> tags.

    Yet, when I try to do the right thing (<ul><?php get_links_list('order'); ?></ul), the generated code doesn't validate either, and combined with the Connection theme's styles, causes the categorized links to nest in a peculiar way:

    <ul><li id="linkcat-1"><h2>Links</h2>
    <ul>
    <li><a href='http://ask.metafilter.com/'>Ask Metafilter</a></li>
    <li><a href='http://henry.coopblue.com/' rel='met sibling'>Henry Nguyen</a></li>

    </ul>
    </li>
    <li id="linkcat-3"><h2>Listening</h2>
    <ul>
    <li><a href='http://www.kexp.org/'>KEXP 90.3 FM</a></li>
    <li><a href='http://www.publicradiofan.com/'>Public Radio Fan</a></li>
    <li><a href='http://www.tuner2.com/'>Tuner2</a></li>

    </ul>
    </li>
    </ul>

    So you see, I'm so close, and I'm going crazy!

    Any help is much appreciated!

Topic Closed

This topic has been closed to new replies.

About this Topic