Title: wp_parse_args
Last modified: August 19, 2016

---

# wp_parse_args

 *  [thienvien2008](https://wordpress.org/support/users/thienvien2008/)
 * (@thienvien2008)
 * [17 years ago](https://wordpress.org/support/topic/wp_parse_args/)
 * [links moderated]
    Small example to reproduce the bug:
 * Open your sidebar.php and add this:
    <?php wp_list_categories(‘title_li=<h2>Pages&
   Categories</h2>’); ?> or <?php wp_list_categories(‘title_li=<h2>Pages & Categories
   </h2>’); ?> or <?php wp_list_categories(‘title_li=<h2>Pages & Categories</h2>’);?
   >
 * As result “Categories</h2>” part will disappear.
 * origin of bug : “Categories</h2>” is considered by wp_parse_args as an unkown
   argument (because of the “&”).

Viewing 1 replies (of 1 total)

 *  [Jer Clarke](https://wordpress.org/support/users/jeremyclarke/)
 * (@jeremyclarke)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/wp_parse_args/#post-1089360)
 * when you use url-query style arguments you can’t have complex strings like that,
   all the values have to be simple strings without spaces (slugs).
 * If you want to pass in complex strings you should use an array definition instead
   like this:
 * `wp_list_categories(array('title_li'=>"<h2>Pages & Categories</h2>"));`
 * [Codex Article about wp_parse_args()](http://codex.wordpress.org/Function_Reference/wp_parse_args)

Viewing 1 replies (of 1 total)

The topic ‘wp_parse_args’ is closed to new replies.

 * In: [Alpha/Beta/RC](https://wordpress.org/support/forum/alphabeta/)
 * 1 reply
 * 2 participants
 * Last reply from: [Jer Clarke](https://wordpress.org/support/users/jeremyclarke/)
 * Last activity: [16 years, 3 months ago](https://wordpress.org/support/topic/wp_parse_args/#post-1089360)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
