[wp-hackers] Passing arguments to wp_list_pages

Ade Walker photofantaisie at gmail.com
Mon Jan 12 09:05:05 GMT 2009


Hi all,

I'm trying to write a function which can pass certain user-definable
arguments (via a theme options page) to wp_list_pages().

In my function I have this:

function (mypagesfunction) {

// code to pull in theme options and set variables

$args = array ( "depth" => $page_depth,
                    "exclude" => $exclude_output,
                    "sort_column" => $sort_column,
                    "title_li" => '',
                );
$newpages = wp_list_pages($args);
echo $newpages;
}

The variables in the array are pulled from theme options (I've left this
code out, above).

All works fine EXCEPT the title_li argument (I don't want a title_li) which
is being ignored. I'm sure I've missed something blindingly obvious - I just
can't see what it is. :-)

Any ideas?

Thanks.

Ade.


More information about the wp-hackers mailing list