Fairweb
Member
Posted 4 years ago #
I need to have special chars in my title_li argument and, of course, it won't take it.
Example :
<?php wp_list_pages('title_li=<h2>I'm online</h2>&child_of=3&depth=1' ); ?>
or
<?php wp_list_pages('title_li=<h2>Répétition</h2>&child_of=3&depth=1' ); ?>
This will not work.
Do you have a solution ? Thanks
I also need a solution for this problem ... please :)?
<?php
$args = array( 'title_li' => '<h2>Répétition</h2>', 'child_of' => '3', 'depth' => '1' );
wp_list_pages($args);
?>
Just set up your parameter key and value pairs as an associative array, then pass your array variable as the argument for wp_list_pages().
http://codex.wordpress.org/Template_Tags/How_to_Pass_Tag_Parameters#Tags_with_query-string-style_parameters
Fairweb
Member
Posted 4 years ago #
Thanks ! I'm sorry, I have searched a long time before asking and missed the information on the page you mentionned. Sorry and thanks for your reply.