WordPress.org

Ready to get started?Download WordPress

Forums

Tag for the name of the link category. (8 posts)

  1. Andrés Sanhueza
    Member
    Posted 7 years ago #

    There's any specific tag for show the name of a link category in the site?

  2. Chris_K
    Member
    Posted 7 years ago #

    I'm not sure I follow the question, but here are the Link Manager template tags: http://codex.wordpress.org/Template_Tags#Links_Manager_tags

  3. Andrés Sanhueza
    Member
    Posted 7 years ago #

    I ask if there's some PHP code I can use between h2 tags.
    <h2>Links</h2>
    <ul>
    <?php get_links(2); ?>
    </ul>

    So I don't have to write the name of the category ID in the template

  4. Kafkaesqui

    Posted 7 years ago #

    You might replace get_links() with:

    http://codex.wordpress.org/Template_Tags/get_links_list

    That will display a list of all links ordered under category (it auto-generates the header for each link category).

  5. Andrés Sanhueza
    Member
    Posted 7 years ago #

    I need something like get_links_list, but for an individual category.

  6. Kafkaesqui

    Posted 7 years ago #

    Then I'm not sure I understand what you need.

    You want a get_links_list() for an individual link category, but to output the link category name? As you're passing the link category ID, don't you already know this?

  7. agharbeia
    Member
    Posted 7 years ago #

    I share the same need with Atoon.

    It is true, Kafkaesqui, that you know the ID of the category when you pass it, but it is good to be able to control the categories' names from Link Manager and leave the code alone, instead of hardcoding the categories' names as titles in the template.

  8. tjeerdoo
    Member
    Posted 7 years ago #

    I'm also wondering how to do this...

    using get_links(1) will display all links in the category with ID 1 but the name of the category won't display....

    I would like to show all categories as blocks and it would be cool to display the category name as well

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags