WordPress.org

Support

Support » Miscellaneous » Tag for the name of the link category.

Tag for the name of the link category.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Chris_K
    Member

    @handysolo

    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

    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

    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).

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

    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?

    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.

    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

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Tag for the name of the link category.’ is closed to new replies.