Forums

How to string content in wp_list_pages (3 posts)

  1. backyarder1
    Member
    Posted 5 months ago #

    I have figured out how to pass the variable to get wp_list_pages to list all pages by an author, but I am also trying to change the title of the list so that it says More pages by $author. I can't seem to figure it out.

    Right now I have: wp_list_pages ('authors=' . $author );

    Every syntax I have tried for adding the list name gives me a string error

  2. stvwlf
    Member
    Posted 5 months ago #

  3. Marventus
    Member
    Posted 5 months ago #

    Hi,

    In order to change the list heading, you need to pass the desired value to the title_li argument, like so:

    wp_list_pages('authors='.$author.'&title_li=More pages by '.$author);

    plus any other arguments you may want to pass as well.

    Hope this helps!

Reply

You must log in to post.

About this Topic