Support » Fixing WordPress » wp_list_pages() trick

  • Hello

    When I’m using wp_list_pages() of course I get list of pages. But the list is generated from the page titles. So sometimes the links are very long.
    So for example if i have tile “This is my first page” I will have link “This is my first page”. I would like to have link “First page”. Is it posible?

Viewing 4 replies - 1 through 4 (of 4 total)
  • anyone?

    Guess it’s possible if you specified, in a field like the excerpt, what you wanted instead of “This is my first page”, and then modify the Walker_Page class in wp-includes/classes.php to use the excerpt instead of the title.

    I don’t know I think it should be an extra field to write the title that will be visible on wp_list_pages().
    So wp_list_pages will not be generated based on title but different field.
    I think is important because there are may situations when we have long title and as a link we wont something short or even something totally different.

    Maybe field like Slug Page.

    Is there any way to do this?

    What do you think?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘wp_list_pages() trick’ is closed to new replies.