WordPress.org

Ready to get started?Download WordPress

Forums

wp_list_pages title_li with special chars (4 posts)

  1. Fairweb
    Member
    Posted 7 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&eacute;p&eacute;tition</h2>&child_of=3&depth=1' ); ?>
    This will not work.
    Do you have a solution ? Thanks

  2. fjulle
    Member
    Posted 6 years ago #

    I also need a solution for this problem ... please :)?

  3. Kafkaesqui

    Posted 6 years ago #

    <?php
    $args = array( 'title_li' => '<h2>R&eacute;p&eacute;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

  4. Fairweb
    Member
    Posted 6 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.

Topic Closed

This topic has been closed to new replies.

About this Topic