Change Link Text (4 posts)

  1. lerizzle
    Posted 6 years ago #

    I want a different link text when using wp_list_page.

    I tried using alt-link-text and page_list_plus and both give me massive php warnings. Is there an alternative?

  2. Dan Cole
    Posted 6 years ago #

    Have you checked out: http://codex.wordpress.org/Template_Tags/wp_list_pages

    I'm not sure what you want? Do you want a different title for the list of pages or do you want the content of each link to be different?

    You can change the list title by using:
    <?php wp_list_pages( array( 'title_li' => 'My Title' )); ?>
    The content of each link is based on the title of the page it links to and would be a more challenging thing to change.

  3. lerizzle
    Posted 6 years ago #

    I'm looking at chaging the link text. By default this uses the post title, but I want it to use something else that I set.

  4. Dan Cole
    Posted 6 years ago #

    If I wanted to do what your asking, I would create a Link Category, which can be created under Links > Link Category. Then create a link to each page with the name you want to display. To display this new set of links, you can use the Links Widget, under Appearance > Widgets. You can find more information about it at: http://codex.wordpress.org/Links_Manager You may want to hard code this list of links somewhere, if so check out: http://codex.wordpress.org/Template_Tags/wp_list_bookmarks

Topic Closed

This topic has been closed to new replies.

About this Topic